# HG changeset patch # User Ka-Hing Cheung # Date 1238044504 0 # Node ID 9f84925079d564fecb3bb4202cc48193bd3c181e # Parent 5e5d230f586272ee371f255d2ac6996f3cced08c# Parent 7988bbd251514c763169becdef42c3b9ec7148e5 merge of 'ab47b66449b213d6fbfc728cc1e8c161bed87755' and 'd1d23cd05745079a820abdcd2310300d0be33c50' diff -r 7988bbd25151 -r 9f84925079d5 libpurple/protocols/bonjour/mdns_win32.c --- a/libpurple/protocols/bonjour/mdns_win32.c Thu Mar 26 03:40:59 2009 +0000 +++ b/libpurple/protocols/bonjour/mdns_win32.c Thu Mar 26 05:15:04 2009 +0000 @@ -169,14 +169,17 @@ 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");