Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/data.c @ 25067:36c73d036026
disapproval of revision '8a80f271858548f73cac50625660e87df1970bcc'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 08 Feb 2009 00:23:13 +0000 |
parents | e30e9779e7bf |
children | 050052891c55 b98519a42e53 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/data.c Thu Feb 05 05:42:58 2009 +0000 +++ b/libpurple/protocols/jabber/data.c Sun Feb 08 00:23:13 2009 +0000 @@ -200,9 +200,11 @@ } void -jabber_data_parse(JabberStream *js, xmlnode *data_node, const char *who, const char *id) +jabber_data_parse(JabberStream *js, xmlnode *packet) { JabberIq *result = NULL; + const char *who = xmlnode_get_attrib(packet, "from"); + xmlnode *data_node = xmlnode_get_child(packet, "data"); const JabberData *data = jabber_data_find_local_by_cid(xmlnode_get_attrib(data_node, "cid")); @@ -211,12 +213,12 @@ result = jabber_iq_new(js, JABBER_IQ_ERROR); xmlnode_set_attrib(result->node, "to", who); - xmlnode_set_attrib(result->node, "id", id); + xmlnode_set_attrib(result->node, "id", xmlnode_get_attrib(packet, "id")); xmlnode_insert_child(result->node, item_not_found); } else { result = jabber_iq_new(js, JABBER_IQ_RESULT); xmlnode_set_attrib(result->node, "to", who); - xmlnode_set_attrib(result->node, "id", id); + xmlnode_set_attrib(result->node, "id", xmlnode_get_attrib(packet, "id")); xmlnode_insert_child(result->node, jabber_data_get_xml_definition(data)); }