Update of /cvsroot/gaim/gaim/src/protocols/jabber
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26863
We no longer send the closing of the jabber stream if we were forcibly disconnected (e.g. the Internet connection dropped and we lost our connection to the Jabber server).
For non-ssl jabber connections, this doesn't change anything. For ssl jabber connections, this prevents a possible crash if the ssl connection is now invalid... which is not a problem for the more-commonly-used Mozilla library and for GnuTLS but is a problem for OpenSSL.
RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/jabber.c,v
retrieving revision 1.325
retrieving revision 1.326
diff -u -d -p -r1.325 -r1.326
--- jabber.c 27 Jan 2006 15:21:49 -0000 1.325
+++ jabber.c 7 Feb 2006 07:47:08 -0000 1.326
@@ -833,7 +833,11 @@ static void jabber_close(GaimConnection
JabberStream *js = gc->proto_data;
- jabber_send_raw(js, "</stream:stream>", -1);
+ /* Don't close the stream if we were forcibly disconnected, as our jabber_send_raw() will,
+ * at best, not go through and will, at worst, crash us.
+ if (!gc->disconnect_timeout)
+ jabber_send_raw(js, "</stream:stream>", -1);