diff libpurple/protocols/jabber/jabber.c @ 25179: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 c4eb9f10ecb5
children 1516525c86fa
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()) {