diff plugins/ssl/ssl-gnutls.c @ 8362:1976914caa51

[gaim-migrate @ 9087] made SSL error handling a little better committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 28 Feb 2004 21:14:51 +0000
parents 01e6e9c46a01
children 27c0cb0d8d07
line wrap: on
line diff
--- a/plugins/ssl/ssl-gnutls.c	Sat Feb 28 20:28:22 2004 +0000
+++ b/plugins/ssl/ssl-gnutls.c	Sat Feb 28 21:14:51 2004 +0000
@@ -72,8 +72,13 @@
 	static const int cert_type_priority[2] = { GNUTLS_CRT_X509, 0 };
 	int ret;
 
-	if (source < 0)
+	if (source < 0) {
+		if(gsc->error_cb != NULL)
+			gsc->error_cb(gsc, GAIM_SSL_CONNECT_FAILED, gsc->connect_cb_data);
+
+		gaim_ssl_close(gsc);
 		return;
+	}
 
 	gsc->fd = source;