changeset 7426:d3711f98f568

[gaim-migrate @ 8029] error handling is cool committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 04 Nov 2003 22:01:50 +0000
parents 85cd2e71bff7
children 30bbf20b4ef1
files src/protocols/jabber/jabber.c
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c	Tue Nov 04 19:18:38 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Tue Nov 04 22:01:50 2003 +0000
@@ -354,6 +354,19 @@
 }
 
 static void
+jabber_ssl_connect_failure(GaimSslConnection *gsc, GaimSslErrorType error,
+		gpointer data)
+{
+	GaimConnection *gc = data;
+
+	switch(error) {
+		case GAIM_SSL_HANDSHAKE_FAILED:
+			gaim_connection_error(gc, _("SSL Handshake Failed"));
+			break;
+	}
+}
+
+static void
 jabber_login(GaimAccount *account)
 {
 	int rc;
@@ -401,7 +414,7 @@
 			&& gaim_ssl_is_supported()) {
 		js->gsc = gaim_ssl_connect(account, server,
 				gaim_account_get_int(account, "port", 5222),
-				jabber_login_callback_ssl, NULL, gc);
+				jabber_login_callback_ssl, jabber_ssl_connect_failure, gc);
 	}
 
 	if(!js->gsc) {