Mercurial > pidgin
changeset 13063:41ec0316cd65
[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 <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 29 Jan 2006 20:42:23 +0000 |
parents | 1ef760c65174 |
children | c73596c40000 |
files | src/protocols/bonjour/bonjour.c src/protocols/bonjour/dns_sd.c |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; }