# HG changeset patch # User Nathan Walp # Date 1077413433 0 # Node ID 52ea0ab31caa337b1e45bf7440f17152fefa13a8 # Parent db1123eb56b0dfcc21b6c600ddec7f8cc4cdfdea [gaim-migrate @ 9039] it's gonna be a long night committer: Tailor Script diff -r db1123eb56b0 -r 52ea0ab31caa src/protocols/jabber/iq.c --- a/src/protocols/jabber/iq.c Sun Feb 22 01:25:54 2004 +0000 +++ b/src/protocols/jabber/iq.c Sun Feb 22 01:30:33 2004 +0000 @@ -241,7 +241,6 @@ xmlnode *query, *error, *x; const char *xmlns; const char *type, *id, *from; - JabberIq *iq; query = xmlnode_get_child(packet, "query"); type = xmlnode_get_attrib(packet, "type"); @@ -311,18 +310,20 @@ /* If we get here, send the default error reply mandated by XMPP-CORE */ - iq = jabber_iq_new(js, JABBER_IQ_ERROR); + if(type && (!strcmp(type, "set") || !strcmp(type, "get"))) { + JabberIq *iq = jabber_iq_new(js, JABBER_IQ_ERROR); - xmlnode_free(iq->node); - iq->node = xmlnode_copy(packet); - xmlnode_set_attrib(iq->node, "to", from); - xmlnode_set_attrib(iq->node, "type", "error"); - error = xmlnode_new_child(iq->node, "error"); - xmlnode_set_attrib(error, "type", "cancel"); - xmlnode_set_attrib(error, "code", "501"); - x = xmlnode_new_child(error, "feature-not-implemented"); - xmlnode_set_attrib(x, "xmlns", "urn:ietf:params:xml:ns:xmpp-stanzas"); + xmlnode_free(iq->node); + iq->node = xmlnode_copy(packet); + xmlnode_set_attrib(iq->node, "to", from); + xmlnode_set_attrib(iq->node, "type", "error"); + error = xmlnode_new_child(iq->node, "error"); + xmlnode_set_attrib(error, "type", "cancel"); + xmlnode_set_attrib(error, "code", "501"); + x = xmlnode_new_child(error, "feature-not-implemented"); + xmlnode_set_attrib(x, "xmlns", "urn:ietf:params:xml:ns:xmpp-stanzas"); - jabber_iq_send(iq); + jabber_iq_send(iq); + } }