# HG changeset patch # User Evan Schoenberg # Date 1139298428 0 # Node ID caee920323e21eb8081a665b5a08c43da2ca1710 # Parent 4bb701a8736f42c6857fd75a999774b64695807a [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. committer: Tailor Script diff -r 4bb701a8736f -r caee920323e2 src/protocols/jabber/jabber.c --- 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, "", -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, "", -1); if(js->gsc) { gaim_ssl_close(js->gsc);