# HG changeset patch # User Ethan Blanton # Date 1154026694 0 # Node ID f327a27f7f071227b247720c366c1dbd3ce56a76 # Parent dd19c67be844ee6e80795fee47f132db00e07202 [gaim-migrate @ 16585] A fix for the nasty libxml corruption crash in jabber, from Henning Norn. committer: Tailor Script diff -r dd19c67be844 -r f327a27f7f07 COPYRIGHT --- a/COPYRIGHT Thu Jul 27 18:35:16 2006 +0000 +++ b/COPYRIGHT Thu Jul 27 18:58:14 2006 +0000 @@ -195,6 +195,7 @@ Richard Nelson Dennis Nezic Matthew A. Nicholson +Henning Norén Szilard Novaki Novell Padraig O'Briain diff -r dd19c67be844 -r f327a27f7f07 src/protocols/jabber/jabber.c --- a/src/protocols/jabber/jabber.c Thu Jul 27 18:35:16 2006 +0000 +++ b/src/protocols/jabber/jabber.c Thu Jul 27 18:58:14 2006 +0000 @@ -66,6 +66,7 @@ /* setup the parser fresh for each stream */ jabber_parser_setup(js); jabber_send_raw(js, open_stream, -1); + js->reinit = FALSE; g_free(open_stream); } @@ -354,6 +355,8 @@ buf[len] = '\0'; gaim_debug(GAIM_DEBUG_INFO, "jabber", "Recv (ssl)(%d): %s\n", len, buf); jabber_parser_process(js, buf, len); + if(js->reinit) + jabber_stream_init(js); } if(errno == EAGAIN) @@ -1009,7 +1012,7 @@ case JABBER_STREAM_REINITIALIZING: gaim_connection_update_progress(js->gc, _("Re-initializing Stream"), 6, JABBER_CONNECT_STEPS); - jabber_stream_init(js); + js->reinit = TRUE; break; case JABBER_STREAM_CONNECTED: jabber_roster_request(js); diff -r dd19c67be844 -r f327a27f7f07 src/protocols/jabber/jabber.h --- a/src/protocols/jabber/jabber.h Thu Jul 27 18:35:16 2006 +0000 +++ b/src/protocols/jabber/jabber.h Thu Jul 27 18:58:14 2006 +0000 @@ -121,6 +121,8 @@ GaimCircBuffer *write_buffer; guint writeh; + gboolean reinit; + /* OK, this stays at the end of the struct, so plugins can depend * on the rest of the stuff being in the right place */