pidgin: 21bda9a0: Set the namespace properly on stanzas fo...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Wed Jul 22 03:35:39 EDT 2009


-----------------------------------------------------------------
Revision: 21bda9a08ab11d5da022a99d11e06df4a8055ff1
Ancestor: 5a2bb37da0d5add24e122a13a827437ecae61ad3
Author: darkrain42 at pidgin.im
Date: 2009-07-21T22:30:01
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/21bda9a08ab11d5da022a99d11e06df4a8055ff1

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

ChangeLog: 

Set the namespace properly on stanzas for BOSH.

Thanks to MattJ for immediately knowing what to do.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	c55d52e6c80dc9f34ce9731bd8f6b54387aae2b5
+++ libpurple/protocols/jabber/jabber.c	d196d8b1ebb9b20da53002692479e3457aa74642
@@ -457,14 +457,21 @@ void jabber_send_signal_cb(PurpleConnect
 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);
 }
 


More information about the Commits mailing list