# HG changeset patch # User Paul Aurich # Date 1287025921 0 # Node ID bc0bccdbc28f917cb4671b6f0815ff1dfe0aad33 # Parent db41f73ac3b686a43168bec451fcfe12151d1d9e jabber: Handle a corner case better by throwing an error instead of stalling This happens if the server *has* a TXT record for _xmppconnect.$domain, but has no useful content there. Fixes #12744, #a14367. diff -r db41f73ac3b6 -r bc0bccdbc28f ChangeLog --- a/ChangeLog Wed Oct 13 21:20:57 2010 +0000 +++ b/ChangeLog Thu Oct 14 03:12:01 2010 +0000 @@ -60,6 +60,9 @@ for Your Domain). (#a14153) * Improved handling of adding oneself to your buddy list when using Non-SASL (legacy) authentication. (#12499) + * Generate a connection error instead of just stalling when the + _xmppconnect TXT record returns results, but none of them result + in a valid BOSH URI. (#a14367, #12744) Yahoo/Yahoo JAPAN: * Stop doing unnecessary lookups of certain alias information. This diff -r db41f73ac3b6 -r bc0bccdbc28f libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Wed Oct 13 21:20:57 2010 +0000 +++ b/libpurple/protocols/jabber/jabber.c Thu Oct 14 03:12:01 2010 +0000 @@ -762,18 +762,10 @@ txt_resolved_cb(GList *responses, gpointer data) { JabberStream *js = data; + gboolean found = FALSE; js->srv_query_data = NULL; - if (responses == NULL) { - purple_debug_warning("jabber", "Unable to find alternative XMPP connection " - "methods after failing to connect directly.\n"); - purple_connection_error_reason(js->gc, - PURPLE_CONNECTION_ERROR_NETWORK_ERROR, - _("Unable to connect")); - return; - } - while (responses) { PurpleTxtResponse *resp = responses->data; gchar **token; @@ -790,9 +782,17 @@ } if (js->bosh) { + found = TRUE; jabber_bosh_connection_connect(js->bosh); - } else { - purple_debug_info("jabber","Didn't find an alternative connection method.\n"); + } + + if (!found) { + purple_debug_warning("jabber", "Unable to find alternative XMPP connection " + "methods after failing to connect directly.\n"); + purple_connection_error_reason(js->gc, + PURPLE_CONNECTION_ERROR_NETWORK_ERROR, + _("Unable to connect")); + return; } if (responses) {