# HG changeset patch # User Mikael Berthe # Date 1208000103 -7200 # Node ID 8fa24a6d1a9343ba4c4cd9322d4ee38ebdf5f79e # Parent af54d33facd025709562c63620717adeb9aebd80 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!). diff -r af54d33facd0 -r 8fa24a6d1a93 mcabber/src/jab_iq.c --- 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) {