changeset 8360:8d012c803411

[gaim-migrate @ 9084] fix jabber SSL connection failure crashes committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 28 Feb 2004 18:53:54 +0000
parents 05c174138e94
children 8ef2f2043902
files plugins/ssl/ssl-nss.c src/protocols/jabber/jabber.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/ssl/ssl-nss.c	Sat Feb 28 17:08:08 2004 +0000
+++ b/plugins/ssl/ssl-nss.c	Sat Feb 28 18:53:54 2004 +0000
@@ -209,7 +209,7 @@
 		gaim_debug_error("nss", "Handshake failed\n");
 
 		if (gsc->error_cb != NULL)
-			gsc->error_cb(gsc, GAIM_SSL_HANDSHAKE_FAILED, data);
+			gsc->error_cb(gsc, GAIM_SSL_HANDSHAKE_FAILED, gsc->connect_cb_data);
 
 		gaim_ssl_close(gsc);
 
--- a/src/protocols/jabber/jabber.c	Sat Feb 28 17:08:08 2004 +0000
+++ b/src/protocols/jabber/jabber.c	Sat Feb 28 18:53:54 2004 +0000
@@ -356,12 +356,15 @@
 		gpointer data)
 {
 	GaimConnection *gc = data;
+	JabberStream *js = gc->proto_data;
 
 	switch(error) {
 		case GAIM_SSL_HANDSHAKE_FAILED:
 			gaim_connection_error(gc, _("SSL Handshake Failed"));
 			break;
 	}
+
+	js->gsc = NULL;
 }
 
 static void tls_init(JabberStream *js)
@@ -778,7 +781,7 @@
 
 	if(js->gsc) {
 		gaim_ssl_close(js->gsc);
-	} else {
+	} else if (js->fd > 0) {
 		if(js->gc->inpa)
 			gaim_input_remove(js->gc->inpa);
 		close(js->fd);