pidgin: b72486b9: jabber: Remove a funky workaround for an...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Wed Feb 3 00:35:45 EST 2010


-----------------------------------------------------------------
Revision: b72486b98465afa17d32904e999cc9621fcdea9a
Ancestor: 1b6cf3f77e2c8084c27497374b95651efa70d2cc
Author: darkrain42 at pidgin.im
Date: 2010-02-03T05:33:33
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b72486b98465afa17d32904e999cc9621fcdea9a

Modified files:
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	f027f0adc9f1d1b9c1078004e7fb65250d1d887c
+++ libpurple/protocols/jabber/jabber.c	31afbaa2ab15dd1d49dbb57d59505fad496d9d5e
@@ -1443,30 +1443,21 @@ void jabber_close(PurpleConnection *gc)
  */
 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);


More information about the Commits mailing list