changeset 29333:1cf9103727f2

jabber: Remove a funky workaround for an (old) OpenSSL crash. I don't think this is an issue anymore; since 122423d4 (mid-2009), gc->disconnect_timeout is set to 0 before calling jabber_close, so these checks never trigger on connection errors (they still do if someone calls purple_connection_error_reason followed immediately by purple_account_disconnect, but I don't think that was the issue here). If this introduces regressions (presumably in Adium), it can be reverted, but Adium betas have been running post-122423d4 versions for the last few.
author Paul Aurich <paul@darkrain42.org>
date Wed, 03 Feb 2010 05:33:33 +0000
parents b65311c73adc
children 7b6933cd7fd3
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 6 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Wed Feb 03 04:54:23 2010 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Wed Feb 03 05:33:33 2010 +0000
@@ -1443,30 +1443,21 @@
  */
 void jabber_close(PurpleConnection *gc)
 {
-	JabberStream *js = gc->proto_data;
+	JabberStream *js = purple_connection_get_protocol_data(gc);
 
 	/* Close all of the open Jingle sessions on this stream */
 	jingle_terminate_sessions(js);
 
-	/* Don't perform any actions on the ssl connection
-	 * if we were forcibly disconnected because it will crash
-	 * on some SSL backends.
-	 */
-	if (!gc->disconnect_timeout) {
-		if (js->bosh)
-			jabber_bosh_connection_close(js->bosh);
-		else if ((js->gsc && js->gsc->fd > 0) || js->fd > 0)
-			jabber_send_raw(js, "</stream:stream>", -1);
-	}
+	if (js->bosh)
+		jabber_bosh_connection_close(js->bosh);
+	else if ((js->gsc && js->gsc->fd > 0) || js->fd > 0)
+		jabber_send_raw(js, "</stream:stream>", -1);
 
 	if (js->srv_query_data)
 		purple_srv_cancel(js->srv_query_data);
 
 	if(js->gsc) {
-#ifdef HAVE_OPENSSL
-		if (!gc->disconnect_timeout)
-#endif
-			purple_ssl_close(js->gsc);
+		purple_ssl_close(js->gsc);
 	} else if (js->fd > 0) {
 		if(js->gc->inpa)
 			purple_input_remove(js->gc->inpa);