Mercurial > pidgin
comparison src/protocols/jabber/iq.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 | 02c7d18f5cc3 |
children |
comparison
equal
deleted
inserted
replaced
13805:853fefb07c79 | 13806:25e63008d3bb |
---|---|
76 { | 76 { |
77 JabberIq *iq = jabber_iq_new(js, type); | 77 JabberIq *iq = jabber_iq_new(js, type); |
78 xmlnode *query; | 78 xmlnode *query; |
79 | 79 |
80 query = xmlnode_new_child(iq->node, "query"); | 80 query = xmlnode_new_child(iq->node, "query"); |
81 xmlnode_set_attrib(query, "xmlns", xmlns); | 81 xmlnode_set_namespace(query, xmlns); |
82 | 82 |
83 return iq; | 83 return iq; |
84 } | 84 } |
85 | 85 |
86 typedef struct _JabberCallbackData { | 86 typedef struct _JabberCallbackData { |
266 } | 266 } |
267 } | 267 } |
268 | 268 |
269 /* Apparently not, so lets see if we have a pre-defined handler */ | 269 /* Apparently not, so lets see if we have a pre-defined handler */ |
270 | 270 |
271 if(type && query && (xmlns = xmlnode_get_attrib(query, "xmlns"))) { | 271 if(type && query && (xmlns = xmlnode_get_namespace(query))) { |
272 if(!strcmp(type, "set")) { | 272 if(!strcmp(type, "set")) { |
273 if(!strcmp(xmlns, "jabber:iq:roster")) { | 273 if(!strcmp(xmlns, "jabber:iq:roster")) { |
274 jabber_roster_parse(js, packet); | 274 jabber_roster_parse(js, packet); |
275 return; | 275 return; |
276 } else if(!strcmp(xmlns, "jabber:iq:oob")) { | 276 } else if(!strcmp(xmlns, "jabber:iq:oob")) { |
327 xmlnode_set_attrib(iq->node, "type", "error"); | 327 xmlnode_set_attrib(iq->node, "type", "error"); |
328 error = xmlnode_new_child(iq->node, "error"); | 328 error = xmlnode_new_child(iq->node, "error"); |
329 xmlnode_set_attrib(error, "type", "cancel"); | 329 xmlnode_set_attrib(error, "type", "cancel"); |
330 xmlnode_set_attrib(error, "code", "501"); | 330 xmlnode_set_attrib(error, "code", "501"); |
331 x = xmlnode_new_child(error, "feature-not-implemented"); | 331 x = xmlnode_new_child(error, "feature-not-implemented"); |
332 xmlnode_set_attrib(x, "xmlns", "urn:ietf:params:xml:ns:xmpp-stanzas"); | 332 xmlnode_set_namespace(x, "urn:ietf:params:xml:ns:xmpp-stanzas"); |
333 | 333 |
334 jabber_iq_send(iq); | 334 jabber_iq_send(iq); |
335 } | 335 } |
336 } | 336 } |
337 | 337 |