# HG changeset patch # User Mark Doliner # Date 1138567343 0 # Node ID 41ec0316cd65e7f7d489db21de36700191d5eb13 # Parent 1ef760c651749d8d66a24242708202459b403a6f [gaim-migrate @ 15425] Bonjour: * Don't attempt to delete the bonjour group if it doesn't exist * Set the session to NULL if it failed to connect. This seems to only be needed when using with Avahi in Howl compatability mode. Patch by David Schmitt (#1418017) committer: Tailor Script diff -r 1ef760c65174 -r 41ec0316cd65 src/protocols/bonjour/bonjour.c --- a/src/protocols/bonjour/bonjour.c Sat Jan 28 23:11:13 2006 +0000 +++ b/src/protocols/bonjour/bonjour.c Sun Jan 29 20:42:23 2006 +0000 @@ -158,7 +158,7 @@ static void bonjour_close(GaimConnection *connection) { - GaimGroup *bonjour_group = gaim_find_group(BONJOUR_GROUP_NAME); + GaimGroup *bonjour_group; BonjourData *bd = (BonjourData*)connection->proto_data; /* Stop looking for buddies in the LAN */ @@ -179,7 +179,9 @@ bonjour_removeallfromlocal(connection); /* Delete the bonjour group */ - gaim_blist_remove_group(bonjour_group); + bonjour_group = gaim_find_group(BONJOUR_GROUP_NAME); + if (bonjour_group != NULL) + gaim_blist_remove_group(bonjour_group); } diff -r 1ef760c65174 -r 41ec0316cd65 src/protocols/bonjour/dns_sd.c --- a/src/protocols/bonjour/dns_sd.c Sat Jan 28 23:11:13 2006 +0000 +++ b/src/protocols/bonjour/dns_sd.c Sun Jan 29 20:42:23 2006 +0000 @@ -347,6 +347,10 @@ if (sw_discovery_init(&data->session) != SW_OKAY) { gaim_debug_error("bonjour", "Unable to initialize an mDNS session.\n"); + + /* In Avahi, sw_discovery_init frees data->session but doesn't clear it */ + data->session = NULL; + return FALSE; }