Tue, 07 Feb 2006 07:47:08 +0000
[gaim-migrate @ 15516]
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.
| src/protocols/jabber/jabber.c | file | annotate | diff | comparison | revisions |
--- a/src/protocols/jabber/jabber.c Tue Feb 07 07:25:45 2006 +0000 +++ b/src/protocols/jabber/jabber.c Tue Feb 07 07:47:08 2006 +0000 @@ -833,7 +833,11 @@ { 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); if(js->gsc) { gaim_ssl_close(js->gsc);