Mercurial > pidgin.yaz
changeset 21120:0cc12e6909e2
don't send a canceled user query
fixes #3812
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 03 Nov 2007 17:04:25 +0000 |
parents | 7a87450fdafe |
children | 35b4f1dc4c8d |
files | libpurple/protocols/jabber/buddy.c |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c Sat Nov 03 16:19:50 2007 +0000 +++ b/libpurple/protocols/jabber/buddy.c Sat Nov 03 17:04:25 2007 +0000 @@ -2252,6 +2252,16 @@ xmlnode *query; JabberIq *iq; char *dir_server = data; + const char *type; + + /* if they've cancelled the search, we're + * just going to get an error if we send + * a cancel, so skip it */ + type = xmlnode_get_attrib(result, "type"); + if(type && !strcmp(type, "cancel")) { + g_free(dir_server); + return; + } iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:search"); query = xmlnode_get_child(iq->node, "query");