libpurple/protocols/jabber/adhoccommands.c

changeset 31096
442e7d4f6cc7
parent 28984
1d84517d56eb
child 32277
97f16af01a05
child 38258
9a6551eba09c
equal deleted inserted replaced
31095:7bd126a5715f 31096:442e7d4f6cc7
123 xmlnode_set_namespace(command,"http://jabber.org/protocol/commands"); 123 xmlnode_set_namespace(command,"http://jabber.org/protocol/commands");
124 xmlnode_set_attrib(command,"sessionid",actionInfo->sessionid); 124 xmlnode_set_attrib(command,"sessionid",actionInfo->sessionid);
125 xmlnode_set_attrib(command,"node",actionInfo->node); 125 xmlnode_set_attrib(command,"node",actionInfo->node);
126 126
127 /* cancel is handled differently on ad-hoc commands than regular forms */ 127 /* cancel is handled differently on ad-hoc commands than regular forms */
128 if(!strcmp(xmlnode_get_namespace(result),"jabber:x:data") && !strcmp(xmlnode_get_attrib(result, "type"),"cancel")) { 128 if (purple_strequal(xmlnode_get_namespace(result), "jabber:x:data") &&
129 purple_strequal(xmlnode_get_attrib(result, "type"), "cancel")) {
129 xmlnode_set_attrib(command,"action","cancel"); 130 xmlnode_set_attrib(command,"action","cancel");
130 } else { 131 } else {
131 if(actionhandle) 132 if(actionhandle)
132 xmlnode_set_attrib(command,"action",actionhandle); 133 xmlnode_set_attrib(command,"action",actionhandle);
133 xmlnode_insert_child(command,result); 134 xmlnode_insert_child(command,result);

mercurial