changeset 27663:e8e056876e39

Set the namespace properly on stanzas for BOSH. Thanks to MattJ for immediately knowing what to do.
author Paul Aurich <paul@darkrain42.org>
date Tue, 21 Jul 2009 22:30:01 +0000
parents 3fc434ac0c57
children 151ec92db74c
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Tue Jul 21 17:10:29 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Tue Jul 21 22:30:01 2009 +0000
@@ -457,14 +457,21 @@
 void jabber_send_signal_cb(PurpleConnection *pc, xmlnode **packet,
                            gpointer unused)
 {
+	JabberStream *js;
 	char *txt;
 	int len;
 
 	if (NULL == packet)
 		return;
 
+	js = purple_connection_get_protocol_data(pc);
+	if (js->use_bosh)
+		if (g_str_equal((*packet)->name, "message") ||
+				g_str_equal((*packet)->name, "iq") ||
+				g_str_equal((*packet)->name, "presence"))
+			xmlnode_set_namespace(*packet, "jabber:client");
 	txt = xmlnode_to_str(*packet, &len);
-	jabber_send_raw(purple_connection_get_protocol_data(pc), txt, len);
+	jabber_send_raw(js, txt, len);
 	g_free(txt);
 }