pidgin: ab47b664: Fix an issue with bonjour buddies that h...

datallah at pidgin.im datallah at pidgin.im
Wed Mar 25 23:40:28 EDT 2009


-----------------------------------------------------------------
Revision: ab47b66449b213d6fbfc728cc1e8c161bed87755
Ancestor: 8f5d54ef7dd2f11dbc1381f22f35e328890eda4f
Author: datallah at pidgin.im
Date: 2009-03-26T03:25:57
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ab47b66449b213d6fbfc728cc1e8c161bed87755

Modified files:
        libpurple/protocols/bonjour/mdns_win32.c

ChangeLog: 

Fix an issue with bonjour buddies that have been dragged into permanent groups
not appearing online when the buddy signs on.
Fixes #8782

-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/mdns_win32.c	6ee6360a9961b40e98aee96a236f8e7e0ee1fa2f
+++ libpurple/protocols/bonjour/mdns_win32.c	3204f78dabd32a7ab07290d66a1529c122897e70
@@ -169,15 +169,18 @@ _mdns_resolve_host_callback(GSList *host
 	gboolean delete_buddy = FALSE;
 	PurpleBuddy *pb = NULL;
 
+	if ((pb = purple_find_buddy(args->account, args->res_data->name))) {
+		if (pb->proto_data != args->bb) {
+			purple_debug_error("bonjour", "Found purple buddy for %s not matching bonjour buddy record.",
+				args->res_data->name);
+			goto cleanup;
+		}
 	/* Make sure that the BonjourBuddy associated with this request is still around */
-	if (g_slist_find(pending_buddies, args->bb) == NULL)
+	} else if (g_slist_find(pending_buddies, args->bb) == NULL) {
+		purple_debug_error("bonjour", "host resolution - complete, but buddy no longer pending.\n");
 		goto cleanup;
+	}
 
-	if ((pb = purple_find_buddy(args->account, args->bb->name)))
-		if (pb->proto_data != args->bb)
-			purple_debug_error("bonjour", "Found purple buddy for %s not matching bonjour buddy record. "
-				"This is going to be ugly!.\n", args->bb->name);
-
 	if (!hosts || !hosts->data) {
 		purple_debug_error("bonjour", "host resolution - callback error.\n");
 		delete_buddy = TRUE;


More information about the Commits mailing list