# HG changeset patch # User Paul Aurich # Date 1234845964 0 # Node ID 97a4d71e0c3dfbb9f0b599efad0d5addecc1408a # Parent 7d2e85f78aec5a74a8a4801acdafb1167eec0fcd Don't fallback (under any conditions) from old-style SSL to other connections purple_ssl_connect() can return NULL under some situations, in which case we should not try to fall back to the straight connection (or SRV queries). Additionally, we also shouldn't try those at the same time we're throwing an "SSL support unavailable" error (there was no return after that error). diff -r 7d2e85f78aec -r 97a4d71e0c3d libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Tue Feb 17 04:28:19 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Tue Feb 17 04:46:04 2009 +0000 @@ -821,22 +821,27 @@ js->certificate_CN, purple_account_get_int(account, "port", 5223), jabber_login_callback_ssl, jabber_ssl_connect_failure, js->gc); + if (!js->gsc) { + purple_connection_error_reason (js->gc, + PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT, + _("Unable to establish SSL connection")); + } } else { purple_connection_error_reason (js->gc, PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT, _("SSL support unavailable")); } + + return; } /* no old-ssl, so if they've specified a connect server, we'll use that, otherwise we'll * invoke the magic of SRV lookups, to figure out host and port */ - if(!js->gsc) { - if(connect_server[0]) { - jabber_login_connect(js, js->user->domain, connect_server, purple_account_get_int(account, "port", 5222), TRUE); - } else { - js->srv_query_data = purple_srv_resolve("xmpp-client", - "tcp", js->user->domain, srv_resolved_cb, js); - } + if(connect_server[0]) { + jabber_login_connect(js, js->user->domain, connect_server, purple_account_get_int(account, "port", 5222), TRUE); + } else { + js->srv_query_data = purple_srv_resolve("xmpp-client", + "tcp", js->user->domain, srv_resolved_cb, js); } }