diff src/protocols/jabber/si.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 5ddde4ad1ca2
children 10e8eb6a4910
line wrap: on
line diff
--- a/src/protocols/jabber/si.c	Wed Jun 07 15:58:27 2006 +0000
+++ b/src/protocols/jabber/si.c	Thu Jun 08 01:03:51 2006 +0000
@@ -139,7 +139,7 @@
 		xmlnode_set_attrib(error, "code", "404");
 		xmlnode_set_attrib(error, "type", "cancel");
 		condition = xmlnode_new_child(error, "condition");
-		xmlnode_set_attrib(condition, "xmlns", "urn:ietf:params:xml:ns:xmpp-stanzas");
+		xmlnode_set_namespace(condition, "urn:ietf:params:xml:ns:xmpp-stanzas");
 		xmlnode_new_child(condition, "item-not-found");
 
 		jabber_iq_send(iq);
@@ -637,14 +637,14 @@
 	iq = jabber_iq_new(jsx->js, JABBER_IQ_SET);
 	xmlnode_set_attrib(iq->node, "to", xfer->who);
 	si = xmlnode_new_child(iq->node, "si");
-	xmlnode_set_attrib(si, "xmlns", "http://jabber.org/protocol/si");
+	xmlnode_set_namespace(si, "http://jabber.org/protocol/si");
 	jsx->stream_id = jabber_get_next_id(jsx->js);
 	xmlnode_set_attrib(si, "id", jsx->stream_id);
 	xmlnode_set_attrib(si, "profile",
 			"http://jabber.org/protocol/si/profile/file-transfer");
 
 	file = xmlnode_new_child(si, "file");
-	xmlnode_set_attrib(file, "xmlns",
+	xmlnode_set_namespace(file,
 			"http://jabber.org/protocol/si/profile/file-transfer");
 	xmlnode_set_attrib(file, "name", xfer->filename);
 	g_snprintf(buf, sizeof(buf), "%" G_GSIZE_FORMAT, xfer->size);
@@ -652,10 +652,10 @@
 	/* maybe later we'll do hash and date attribs */
 
 	feature = xmlnode_new_child(si, "feature");
-	xmlnode_set_attrib(feature, "xmlns",
+	xmlnode_set_namespace(feature,
 			"http://jabber.org/protocol/feature-neg");
 	x = xmlnode_new_child(feature, "x");
-	xmlnode_set_attrib(x, "xmlns", "jabber:x:data");
+	xmlnode_set_namespace(x, "jabber:x:data");
 	xmlnode_set_attrib(x, "type", "form");
 	field = xmlnode_new_child(x, "field");
 	xmlnode_set_attrib(field, "var", "stream-method");
@@ -771,13 +771,13 @@
 		jsx->accepted = TRUE;
 
 		si = xmlnode_new_child(iq->node, "si");
-		xmlnode_set_attrib(si, "xmlns", "http://jabber.org/protocol/si");
+		xmlnode_set_namespace(si, "http://jabber.org/protocol/si");
 
 		feature = xmlnode_new_child(si, "feature");
-		xmlnode_set_attrib(feature, "xmlns", "http://jabber.org/protocol/feature-neg");
+		xmlnode_set_namespace(feature, "http://jabber.org/protocol/feature-neg");
 
 		x = xmlnode_new_child(feature, "x");
-		xmlnode_set_attrib(x, "xmlns", "jabber:x:data");
+		xmlnode_set_namespace(x, "jabber:x:data");
 		xmlnode_set_attrib(x, "type", "submit");
 
 		field = xmlnode_new_child(x, "field");