From c1ed6527576ac4c6ee1241f662e7db8e59327fd8 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 2 Oct 2006 15:19:13 +0200 Subject: No more double free()/crashes when trying to set up an SSL connection to a non-SSL server, and better handling of TLS connection setup by initializing the TLS session from a callback function (which guarantees a valid return value from ssl_starttls() before any error callback could be called). --- protocols/jabber/io.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'protocols') diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c index 189320d9..8834c906 100644 --- a/protocols/jabber/io.c +++ b/protocols/jabber/io.c @@ -223,9 +223,14 @@ gboolean jabber_connected_plain( gpointer data, gint source, b_input_condition c gboolean jabber_connected_ssl( gpointer data, void *source, b_input_condition cond ) { struct gaim_connection *gc = data; + struct jabber_data *jd = gc->proto_data; if( source == NULL ) { + /* The SSL connection will be cleaned up by the SSL lib + already, set it to NULL here to prevent a double cleanup: */ + jd->ssl = NULL; + hide_login_progress( gc, "Could not connect to server" ); signoff( gc ); return FALSE; -- cgit v1.2.3