# HG changeset patch # User Nathan Walp # Date 1078002891 0 # Node ID 1976914caa51c3967fe82730673a71f08223d75c # Parent 8ef2f204390237ea42033edd498ea4a655d482fa [gaim-migrate @ 9087] made SSL error handling a little better committer: Tailor Script diff -r 8ef2f2043902 -r 1976914caa51 plugins/ssl/ssl-gnutls.c --- 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; diff -r 8ef2f2043902 -r 1976914caa51 plugins/ssl/ssl-nss.c --- a/plugins/ssl/ssl-nss.c Sat Feb 28 20:28:22 2004 +0000 +++ b/plugins/ssl/ssl-nss.c Sat Feb 28 21:14:51 2004 +0000 @@ -170,6 +170,9 @@ { gaim_debug_error("nss", "nss_data->fd == NULL!\n"); + if (gsc->error_cb != NULL) + gsc->error_cb(gsc, GAIM_SSL_CONNECT_FAILED, gsc->connect_cb_data); + gaim_ssl_close((GaimSslConnection *)gsc); return; @@ -186,6 +189,9 @@ { gaim_debug_error("nss", "nss_data->in == NUL!\n"); + if (gsc->error_cb != NULL) + gsc->error_cb(gsc, GAIM_SSL_CONNECT_FAILED, gsc->connect_cb_data); + gaim_ssl_close((GaimSslConnection *)gsc); return; diff -r 8ef2f2043902 -r 1976914caa51 src/protocols/jabber/JEPS --- a/src/protocols/jabber/JEPS Sat Feb 28 20:28:22 2004 +0000 +++ b/src/protocols/jabber/JEPS Sat Feb 28 21:14:51 2004 +0000 @@ -4,8 +4,6 @@ In-Band Bytestreams 0060: NEED Pub-Sub -0065: IN PROGRESS - SOCKS5 Bytestreams 0071: AWAITING FINAL SPEC XHTML-IM 0073: NEED @@ -20,10 +18,6 @@ Generic Alerts 0093: NEED Roster Item Exchange -0095: IN PROGRESS - Stream Initiation -0096: IN PROGRESS - File Transfer Stream Initiation Profile 0100: NEED Gateway Interaction (Transports) 0115: WATCH diff -r 8ef2f2043902 -r 1976914caa51 src/protocols/jabber/jabber.c --- a/src/protocols/jabber/jabber.c Sat Feb 28 20:28:22 2004 +0000 +++ b/src/protocols/jabber/jabber.c Sat Feb 28 21:14:51 2004 +0000 @@ -359,6 +359,9 @@ JabberStream *js = gc->proto_data; switch(error) { + case GAIM_SSL_CONNECT_FAILED: + gaim_connection_error(gc, _("Connection Failed")); + break; case GAIM_SSL_HANDSHAKE_FAILED: gaim_connection_error(gc, _("SSL Handshake Failed")); break; diff -r 8ef2f2043902 -r 1976914caa51 src/sslconn.h --- a/src/sslconn.h Sat Feb 28 20:28:22 2004 +0000 +++ b/src/sslconn.h Sat Feb 28 21:14:51 2004 +0000 @@ -31,8 +31,8 @@ typedef enum { - GAIM_SSL_HANDSHAKE_FAILED = 1 - + GAIM_SSL_HANDSHAKE_FAILED = 1, + GAIM_SSL_CONNECT_FAILED = 2 } GaimSslErrorType; typedef struct _GaimSslConnection GaimSslConnection;