diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-10-02 15:19:13 +0200 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-10-02 15:19:13 +0200 | 
| commit | c1ed6527576ac4c6ee1241f662e7db8e59327fd8 (patch) | |
| tree | 8006e8c6ff63dc8150f73d4c0fd937e3dcbd48b8 /protocols/jabber/io.c | |
| parent | 88591fd3b95ab21ca016204b49fb80d6d6cdd541 (diff) | |
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).
Diffstat (limited to 'protocols/jabber/io.c')
| -rw-r--r-- | protocols/jabber/io.c | 5 | 
1 files changed, 5 insertions, 0 deletions
| 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; | 
