Mercurial > pidgin.yaz
changeset 19238:771423734d6a
merge of '5af486724d98e56d56d8754e0b3d06d5f48b88d4'
and 'd2728075ea812d40b40b69e2fddd0d441676ec5f'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 14 Aug 2007 01:18:35 +0000 |
parents | 6e3cd5e80420 (diff) f5d9b9bbf5fd (current diff) |
children | 428562735971 |
files | |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/jabber.c Tue Aug 14 01:18:10 2007 +0000 +++ b/libpurple/protocols/bonjour/jabber.c Tue Aug 14 01:18:35 2007 +0000 @@ -371,6 +371,8 @@ purple_debug_info("bonjour", "Recieved conversation close notification from %s.\n", pb->name); + g_return_if_fail(bb != NULL); + /* Close the socket, clear the watcher and free memory */ bonjour_jabber_close_conversation(bb->conversation); bb->conversation = NULL;
--- a/libpurple/protocols/bonjour/parser.c Tue Aug 14 01:18:10 2007 +0000 +++ b/libpurple/protocols/bonjour/parser.c Tue Aug 14 01:18:35 2007 +0000 @@ -82,6 +82,11 @@ } } +static gboolean _async_bonjour_jabber_stream_ended_cb(gpointer data) { + bonjour_jabber_stream_ended((PurpleBuddy *) data); + return FALSE; +} + static void bonjour_parser_element_end_libxml(void *user_data, const xmlChar *element_name, const xmlChar *prefix, const xmlChar *namespace) @@ -94,7 +99,9 @@ /* We don't keep a reference to the start stream xmlnode, * so we have to check for it here to close the conversation */ if(!xmlStrcmp(element_name, (xmlChar*) "stream")) { - bonjour_jabber_stream_ended(pb); + /* Asynchronously close the conversation to prevent bonjour_parser_setup() + * being called from within this context */ + g_idle_add(_async_bonjour_jabber_stream_ended_cb, pb); } return; }