libpurple/protocols/jabber/buddy.c

changeset 21388
108195e86aa3
parent 21381
d28824be6224
child 21453
a90cf329cd48
--- 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");

mercurial