changeset 25774:514051f3b6cf

Add option for forcing BOSH (useful for debugging)
author Paul Aurich <paul@darkrain42.org>
date Mon, 01 Dec 2008 04:00:41 +0000
parents f47429b5ab52
children 1516525c86fa
files libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/libxmpp.c
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Sat Nov 29 21:41:55 2008 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Mon Dec 01 04:00:41 2008 +0000
@@ -725,6 +725,8 @@
 			"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_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()) {
--- a/libpurple/protocols/jabber/libxmpp.c	Sat Nov 29 21:41:55 2008 +0000
+++ b/libpurple/protocols/jabber/libxmpp.c	Mon Dec 01 04:00:41 2008 +0000
@@ -234,7 +234,13 @@
 						"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);