diff src/protocols/jabber/chat.c @ 13806:25e63008d3bb

[gaim-migrate @ 16229] Use libxml2 for XML parsing, if available. The biggest benefit from this is actual support for XML namespaces. This fixes a handful of Google Talk integration problems, including typing notifications and buddy icons. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 08 Jun 2006 01:03:51 +0000
parents 967ef719cb62
children
line wrap: on
line diff
--- a/src/protocols/jabber/chat.c	Wed Jun 07 15:58:27 2006 +0000
+++ b/src/protocols/jabber/chat.c	Thu Jun 08 01:03:51 2006 +0000
@@ -162,7 +162,7 @@
 	if(chat->muc) {
 		xmlnode_set_attrib(message, "to", room_jid);
 		x = xmlnode_new_child(message, "x");
-		xmlnode_set_attrib(x, "xmlns", "http://jabber.org/protocol/muc#user");
+		xmlnode_set_namespace(x, "http://jabber.org/protocol/muc#user");
 		invite = xmlnode_new_child(x, "invite");
 		xmlnode_set_attrib(invite, "to", name);
 		body = xmlnode_new_child(invite, "reason");
@@ -173,7 +173,7 @@
 		xmlnode_insert_data(body, msg, -1);
 		x = xmlnode_new_child(message, "x");
 		xmlnode_set_attrib(x, "jid", room_jid);
-		xmlnode_set_attrib(x, "xmlns", "jabber:x:conference");
+		xmlnode_set_namespace(x, "jabber:x:conference");
 	}
 
 	jabber_send(js, message);
@@ -267,7 +267,7 @@
 	g_free(full_jid);
 
 	x = xmlnode_new_child(presence, "x");
-	xmlnode_set_attrib(x, "xmlns", "http://jabber.org/protocol/muc");
+	xmlnode_set_namespace(x, "http://jabber.org/protocol/muc");
 
 	if(passwd && *passwd) {
 		xmlnode *password = xmlnode_new_child(x, "password");
@@ -380,7 +380,7 @@
 
 		for(x = xmlnode_get_child(query, "x"); x; x = xmlnode_get_next_twin(x)) {
 			const char *xmlns;
-			if(!(xmlns = xmlnode_get_attrib(x, "xmlns")))
+			if(!(xmlns = xmlnode_get_namespace(x)))
 				continue;
 
 			if(!strcmp(xmlns, "jabber:x:data")) {
@@ -451,7 +451,7 @@
 	room_jid = g_strdup_printf("%s@%s", chat->room, chat->server);
 
 	xmlnode_set_attrib(iq->node, "to", room_jid);
-	xmlnode_set_attrib(x, "xmlns", "jabber:x:data");
+	xmlnode_set_namespace(x, "jabber:x:data");
 	xmlnode_set_attrib(x, "type", "submit");
 
 	jabber_iq_send(iq);
@@ -524,7 +524,7 @@
 		for(x = xmlnode_get_child(query, "x"); x; x = xmlnode_get_next_twin(x)) {
 			const char *xmlns;
 
-			if(!(xmlns = xmlnode_get_attrib(x, "xmlns")))
+			if(!(xmlns = xmlnode_get_namespace(x)))
 				continue;
 
 			if(!strcmp(xmlns, "jabber:x:data")) {