diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-03-27 16:48:58 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-03-27 16:48:58 +0100 |
commit | 540756bf5446f30b66b716027b4f8550a462f4fc (patch) | |
tree | 4ab8124a532d498eaba1985ba9642d77542ba87c /src/plugins/jabber | |
parent | 6e7b62be9723205cb4f7dc69966ed80ed7119dd6 (diff) | |
download | weechat-540756bf5446f30b66b716027b4f8550a462f4fc.zip |
Fix SSL connection to some IRC servers using Diffie Hellman and small exchange keys (bug #25996)
Diffstat (limited to 'src/plugins/jabber')
-rw-r--r-- | src/plugins/jabber/jabber-server.c | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/src/plugins/jabber/jabber-server.c b/src/plugins/jabber/jabber-server.c index 7c09f2500..bb2053e0c 100644 --- a/src/plugins/jabber/jabber-server.c +++ b/src/plugins/jabber/jabber-server.c @@ -539,7 +539,8 @@ jabber_server_login (struct t_jabber_server *server) */ int -jabber_server_connect_cb (void *arg_server, int status, const char *ip_address) +jabber_server_connect_cb (void *arg_server, int status, const char *error, + const char *ip_address) { struct t_jabber_server *server; const char *proxy; @@ -577,6 +578,14 @@ jabber_server_connect_cb (void *arg_server, int status, const char *ip_address) jabber_buffer_get_server_prefix (server, "error"), JABBER_PLUGIN_NAME, server->address); + if (error && error[0]) + { + weechat_printf (server->buffer, + _("%s%s: error: %s"), + jabber_buffer_get_server_prefix (server, "error"), + JABBER_PLUGIN_NAME, + error); + } jabber_server_close_connection (server); jabber_server_reconnect_schedule (server); break; @@ -587,6 +596,14 @@ jabber_server_connect_cb (void *arg_server, int status, const char *ip_address) _("%s%s: IP address not found"), jabber_buffer_get_server_prefix (server, "error"), JABBER_PLUGIN_NAME); + if (error && error[0]) + { + weechat_printf (server->buffer, + _("%s%s: error: %s"), + jabber_buffer_get_server_prefix (server, "error"), + JABBER_PLUGIN_NAME, + error); + } jabber_server_close_connection (server); jabber_server_reconnect_schedule (server); break; @@ -597,6 +614,14 @@ jabber_server_connect_cb (void *arg_server, int status, const char *ip_address) _("%s%s: connection refused"), jabber_buffer_get_server_prefix (server, "error"), JABBER_PLUGIN_NAME); + if (error && error[0]) + { + weechat_printf (server->buffer, + _("%s%s: error: %s"), + jabber_buffer_get_server_prefix (server, "error"), + JABBER_PLUGIN_NAME, + error); + } jabber_server_close_connection (server); jabber_server_reconnect_schedule (server); break; @@ -609,6 +634,14 @@ jabber_server_connect_cb (void *arg_server, int status, const char *ip_address) "proxy)"), jabber_buffer_get_server_prefix (server, "error"), JABBER_PLUGIN_NAME); + if (error && error[0]) + { + weechat_printf (server->buffer, + _("%s%s: error: %s"), + jabber_buffer_get_server_prefix (server, "error"), + JABBER_PLUGIN_NAME, + error); + } jabber_server_close_connection (server); jabber_server_reconnect_schedule (server); break; @@ -617,6 +650,14 @@ jabber_server_connect_cb (void *arg_server, int status, const char *ip_address) _("%s%s: unable to set local hostname/IP"), jabber_buffer_get_server_prefix (server, "error"), JABBER_PLUGIN_NAME); + if (error && error[0]) + { + weechat_printf (server->buffer, + _("%s%s: error: %s"), + jabber_buffer_get_server_prefix (server, "error"), + JABBER_PLUGIN_NAME, + error); + } jabber_server_close_connection (server); jabber_server_reconnect_schedule (server); break; @@ -625,6 +666,14 @@ jabber_server_connect_cb (void *arg_server, int status, const char *ip_address) _("%s%s: GnuTLS init error"), jabber_buffer_get_server_prefix (server, "error"), JABBER_PLUGIN_NAME); + if (error && error[0]) + { + weechat_printf (server->buffer, + _("%s%s: error: %s"), + jabber_buffer_get_server_prefix (server, "error"), + JABBER_PLUGIN_NAME, + error); + } jabber_server_close_connection (server); jabber_server_reconnect_schedule (server); break; @@ -633,6 +682,14 @@ jabber_server_connect_cb (void *arg_server, int status, const char *ip_address) _("%s%s: GnuTLS handshake failed"), jabber_buffer_get_server_prefix (server, "error"), JABBER_PLUGIN_NAME); + if (error && error[0]) + { + weechat_printf (server->buffer, + _("%s%s: error: %s"), + jabber_buffer_get_server_prefix (server, "error"), + JABBER_PLUGIN_NAME, + error); + } jabber_server_close_connection (server); jabber_server_reconnect_schedule (server); break; @@ -641,6 +698,14 @@ jabber_server_connect_cb (void *arg_server, int status, const char *ip_address) _("%s%s: not enough memory"), jabber_buffer_get_server_prefix (server, "error"), JABBER_PLUGIN_NAME); + if (error && error[0]) + { + weechat_printf (server->buffer, + _("%s%s: error: %s"), + jabber_buffer_get_server_prefix (server, "error"), + JABBER_PLUGIN_NAME, + error); + } jabber_server_close_connection (server); jabber_server_reconnect_schedule (server); break; |