cpw.darkrain42.xmpp.bosh: 159a990a: Add option for forcing BOSH (useful for ...

paul at darkrain42.org paul at darkrain42.org
Sat Jan 17 23:51:20 EST 2009


-----------------------------------------------------------------
Revision: 159a990a6f01beeb7727b7fb70c064d8f87e06cd
Ancestor: 81e48d862619c52a2a372c0234bc70c3624ca7fd
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/159a990a6f01beeb7727b7fb70c064d8f87e06cd

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

ChangeLog: 

Add option for forcing BOSH (useful for debugging)

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	0df4e72a744040f47dcc0abd9470b4e4d8fabe68
+++ libpurple/protocols/jabber/jabber.c	77020c85efc3be71a0a112516cd1be76e66b3fc8
@@ -725,6 +725,8 @@ jabber_login(PurpleAccount *account)
 			"connect_server", "");
 	JabberStream *js;
 	JabberBuddy *my_jb = NULL;
+	/* XXX FORCE_BOSH */
+	gboolean force_bosh = purple_account_get_bool(account, "force_bosh", FALSE);
 
 	gc->flags |= PURPLE_CONNECTION_HTML |
 		PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY;
@@ -765,6 +767,12 @@ jabber_login(PurpleAccount *account)
 
 	jabber_stream_set_state(js, JABBER_STREAM_CONNECTING);
 
+	/* XXX FORCE_BOSH: Remove this */
+	if (force_bosh) {
+		purple_txt_resolve("_xmppconnect", js->user->domain, txt_resolved_cb, gc);
+		return;
+	}
+
 	/* if they've got old-ssl mode going, we probably want to ignore SRV lookups */
 	if(purple_account_get_bool(js->gc->account, "old_ssl", FALSE)) {
 		if(purple_ssl_is_supported()) {
============================================================
--- libpurple/protocols/jabber/libxmpp.c	24cca04ce60d507779acdaaf5c59502029ca19e3
+++ libpurple/protocols/jabber/libxmpp.c	d3b44e74835751fa6faabf516be00ab88fe46084
@@ -234,7 +234,13 @@ init_plugin(PurplePlugin *plugin)
 						"auth_plain_in_clear", FALSE);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
 						   option);
-	
+
+	/* XXX FORCE_BOSH: Remove this before re-merging branch */
+	option = purple_account_option_bool_new(_("Force BOSH (debugging)"),
+						"force_bosh", FALSE);
+	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
+							option);
+
 	option = purple_account_option_int_new(_("Connect port"), "port", 5222);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
 						   option);


More information about the Commits mailing list