Mercurial > pidgin.yaz
changeset 21182:581af8ea9ba1
merge of '3df0bc5b9537dc64833bb97fe2a03920e6f0c304'
and '7eccb0cdce9d646aacc309eaadcf48c6809fb7ce'
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Fri, 09 Nov 2007 08:06:20 +0000 |
parents | 134e057e947b (diff) 50a93945811b (current diff) |
children | 86ee2d3d720a |
files | |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/adhoccommands.c Fri Nov 09 04:07:37 2007 +0000 +++ b/libpurple/protocols/jabber/adhoccommands.c Fri Nov 09 08:06:20 2007 +0000 @@ -109,9 +109,15 @@ xmlnode_set_namespace(command,"http://jabber.org/protocol/commands"); xmlnode_set_attrib(command,"sessionid",actionInfo->sessionid); xmlnode_set_attrib(command,"node",actionInfo->node); - if(actionhandle) - xmlnode_set_attrib(command,"action",actionhandle); - xmlnode_insert_child(command,result); + + /* cancel is handled differently on ad-hoc commands than regular forms */ + if(!strcmp(xmlnode_get_namespace(result),"jabber:x:data") && !strcmp(xmlnode_get_attrib(result, "type"),"cancel")) { + xmlnode_set_attrib(command,"action","cancel"); + } else { + if(actionhandle) + xmlnode_set_attrib(command,"action",actionhandle); + xmlnode_insert_child(command,result); + } for(action = actionInfo->actionslist; action; action = g_list_next(action)) { char *handle = action->data;