cpw.darkrain42.xmpp.bosh: 576230e0: Track the TXT query in the js object so ...

paul at darkrain42.org paul at darkrain42.org
Sat Jan 17 23:55:52 EST 2009


-----------------------------------------------------------------
Revision: 576230e046f0752697bf216977fc3a19f64d1227
Ancestor: 159a990a6f01beeb7727b7fb70c064d8f87e06cd
Author: paul at darkrain42.org
Date: 2008-12-01T04:00:41
Branch: im.pidgin.cpw.darkrain42.xmpp.bosh
URL: http://d.pidgin.im/viewmtn/revision/info/576230e046f0752697bf216977fc3a19f64d1227

Modified files:
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

Track the TXT query in the js object so it will be cancelleable

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	77020c85efc3be71a0a112516cd1be76e66b3fc8
+++ libpurple/protocols/jabber/jabber.c	7a23144917e5a9ecc83c7095ec6a9a7db3f665f2
@@ -576,6 +576,8 @@ txt_resolved_cb(PurpleTxtResponse *resp,
 	JabberStream *js = gc->proto_data;
 	int n;
 	
+	js->srv_query_data = NULL;
+
 	if (results == 0) {
 		gchar *tmp;
 		tmp = g_strdup_printf(_("Could not find alternative XMPP connection methods after failing to connect directly.\n"));
@@ -590,7 +592,7 @@ txt_resolved_cb(PurpleTxtResponse *resp,
 		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]);
-			jabber_bosh_connection_init(&(js->bosh), gc->account, js, token[1]);
+			jabber_bosh_connection_init(&(js->bosh), js->gc->account, js, token[1]);
 			g_strfreev(token);
 			break;
 		}
@@ -616,7 +618,7 @@ jabber_login_callback(gpointer data, gin
 			try_srv_connect(js);
 		} else {
 			purple_debug_info("jabber","Couldn't connect directly to %s. Trying to find alternative connection methods, like BOSH.\n", js->user->domain);
-			purple_txt_resolve("_xmppconnect", js->user->domain, txt_resolved_cb, gc);
+			js->srv_query_data = purple_txt_resolve("_xmppconnect", js->user->domain, txt_resolved_cb, gc);
 		}
 		return;
 	}
@@ -769,7 +771,7 @@ jabber_login(PurpleAccount *account)
 
 	/* XXX FORCE_BOSH: Remove this */
 	if (force_bosh) {
-		purple_txt_resolve("_xmppconnect", js->user->domain, txt_resolved_cb, gc);
+		js->srv_query_data = purple_txt_resolve("_xmppconnect", js->user->domain, txt_resolved_cb, gc);
 		return;
 	}
 


More information about the Commits mailing list