Sun, 29 Jan 2006 20:42:23 +0000
[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: Mark Doliner <markdoliner@pidgin.im>
| src/protocols/bonjour/bonjour.c | file | annotate | diff | comparison | revisions | |
| src/protocols/bonjour/dns_sd.c | file | annotate | diff | comparison | revisions |
--- 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); }
--- 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; }