soc.2008.xmpp: 8b86cecf: * small bugfix in jabber_ipc_add_feature...
tfar at soc.pidgin.im
tfar at soc.pidgin.im
Sun Aug 3 18:46:17 EDT 2008
-----------------------------------------------------------------
Revision: 8b86cecf9b220c8c8caae1564356469cebf82fd4
Ancestor: a3ef65d2020abc61d9b341164c078f9ecb62605e
Author: tfar at soc.pidgin.im
Date: 2008-08-03T22:21:49
Branch: im.pidgin.soc.2008.xmpp
URL: http://d.pidgin.im/viewmtn/revision/info/8b86cecf9b220c8c8caae1564356469cebf82fd4
Modified files:
libpurple/protocols/jabber/jabber.c
ChangeLog:
* small bugfix in jabber_ipc_add_feature()
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c 97f3de4f1cfb4aa4b705100ecfb3c6b825b54c36
+++ libpurple/protocols/jabber/jabber.c 9d6c90aeb4dcf6074b7787993a1af4440d189253
@@ -528,7 +528,7 @@ txt_resolved_cb(PurpleTxtResponse *resp,
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 @@ txt_resolved_cb(PurpleTxtResponse *resp,
}
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 @@ jabber_ipc_contact_has_feature(gchar *fu
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;
}
More information about the Commits
mailing list