Mercurial > hg
changeset 1461:8fa24a6d1a93
Improve Remote Controlling Clients
The XEP recommends adding the node to the IQ response.
Some clients seem not to understand the answer when it is omitted.
Problem reported by Rhaamo and js (thanks to js for spotting the
node issue!).
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 12 Apr 2008 13:35:03 +0200 |
parents | af54d33facd0 |
children | 2b43d89a10bb |
files | mcabber/src/jab_iq.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/jab_iq.c Fri Apr 11 21:59:06 2008 +0200 +++ b/mcabber/src/jab_iq.c Sat Apr 12 13:35:03 2008 +0200 @@ -1069,12 +1069,18 @@ xmlnode myquery; jid requester_jid; const struct adhoc_command *command; + const char *node; bool from_self; + x = jutil_iqnew(JPACKET__RESULT, NS_DISCO_ITEMS); xmlnode_put_attrib(x, "id", id); xmlnode_put_attrib(x, "to", xmlnode_get_attrib(xmldata, "from")); myquery = xmlnode_get_tag(x, "query"); + node = xmlnode_get_attrib(xmlnode_get_tag(xmldata, "query"), "node"); + if (node) + xmlnode_put_attrib(myquery, "node", node); + requester_jid = jid_new(conn->p, xmlnode_get_attrib(xmldata, "from")); from_self = !jid_cmpx(conn->user, requester_jid, JID_USER | JID_SERVER); @@ -1341,7 +1347,7 @@ xmlnode xmldata) { xmlnode x; - char *node; + const char *node; x = xmlnode_get_tag(xmldata, "query"); node = xmlnode_get_attrib(x, "node"); if (node) {