# HG changeset patch # User Mikael Berthe # Date 1257369845 -3600 # Node ID cfa1fff86f7877cd689261f871261e8ae5d92a1f # Parent 472cd6ac20fa31c81711128c2e1cd7a738ceb489 Reorder processing in handle_iq() There's no need to call the get/set handler functions if we receive an error IQ message. diff -r 472cd6ac20fa -r cfa1fff86f78 mcabber/src/xmpp.c --- a/mcabber/src/xmpp.c Wed Nov 04 22:18:31 2009 +0100 +++ b/mcabber/src/xmpp.c Wed Nov 04 22:24:05 2009 +0100 @@ -1413,6 +1413,11 @@ LmMessageNode *x; LmMessageSubType mstype = lm_message_get_sub_type(m); + if (mstype == LM_MESSAGE_SUB_TYPE_ERROR) { + display_server_error(lm_message_node_get_child(m->node, "error")); + return LM_HANDLER_RESULT_REMOVE_MESSAGE; + } + for (x = m->node->children; x; x=x->next) { xmlns = lm_message_node_get_attribute(x, "xmlns"); if (xmlns) @@ -1422,11 +1427,6 @@ xmlns = NULL; } - if (mstype == LM_MESSAGE_SUB_TYPE_ERROR) { - display_server_error(lm_message_node_get_child(m->node, "error")); - return LM_HANDLER_RESULT_REMOVE_MESSAGE; - } - if ((mstype == LM_MESSAGE_SUB_TYPE_SET) || (mstype == LM_MESSAGE_SUB_TYPE_GET)) send_iq_error(connection, m, XMPP_ERROR_NOT_IMPLEMENTED);