[gaim-migrate @ 16585]

Thu, 27 Jul 2006 18:58:14 +0000

author
Ethan Blanton <elb@pidgin.im>
date
Thu, 27 Jul 2006 18:58:14 +0000
changeset 14062
dd8d7eb8fa76
parent 14061
bac5eee98038
child 14063
884ee51b28e9

[gaim-migrate @ 16585]
A fix for the nasty libxml corruption crash in jabber, from Henning
Norén.

COPYRIGHT file | annotate | diff | comparison | revisions
src/protocols/jabber/jabber.c file | annotate | diff | comparison | revisions
src/protocols/jabber/jabber.h file | annotate | diff | comparison | revisions
--- 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
--- 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);
--- 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
 	 */

mercurial