# HG changeset patch # User Tobias Markmann # Date 1217802109 0 # Node ID 9f8951284a2eef5d94cd0876f4b2f12c76be7d0c # Parent 7768cad83127bd324c3c428a58022556091de112 * small bugfix in jabber_ipc_add_feature() diff -r 7768cad83127 -r 9f8951284a2e libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sun Aug 03 13:48:59 2008 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sun Aug 03 22:21:49 2008 +0000 @@ -528,7 +528,7 @@ JabberStream *js = gc->proto_data; int n; - if (results > 0) { + if (results == 0) { gchar *tmp; tmp = g_strdup_printf(_("Could not find alternative XMPP connection methods after failing to connect directly.\n")); purple_connection_error_reason (gc, @@ -537,7 +537,15 @@ } for (n = 0; n < results; n++) { - purple_debug_info("dnssrv","TXT RDATA: %s\n", resp[n].content); + gchar **token; + token = g_strsplit(resp[n].content, "=", 2); + if (!strcmp(token[0], "_xmpp-client-xbosh")) { + purple_debug_info("jabber","Found alternative connection method using %s at %s.\n", token[0], token[1]); + js->bosh.url = g_strdup(token[1]); + g_strfreev(token); + break; + } + g_strfreev(token); } } @@ -2484,7 +2492,7 @@ if (!caps_info) return FALSE; capabilities = g_hash_table_lookup(capstable, caps_info); - if (g_list_find(capabilities->features, feature) == NULL) return FALSE ; + if (g_list_find_custom(capabilities->features, feature, strcmp) == NULL) return FALSE ; return TRUE; }