changeset 28221:e502112a03e7

jabber: Emit jabber-receiving-iq after we've ensured id is !NULL
author Paul Aurich <paul@darkrain42.org>
date Tue, 11 Aug 2009 15:57:54 +0000
parents 4c6ea36672dc
children 6fca316de1e2 b7b25f580637
files libpurple/protocols/jabber/iq.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/iq.c	Tue Aug 11 02:44:41 2009 +0000
+++ b/libpurple/protocols/jabber/iq.c	Tue Aug 11 15:57:54 2009 +0000
@@ -282,11 +282,6 @@
 	id = xmlnode_get_attrib(packet, "id");
 	iq_type = xmlnode_get_attrib(packet, "type");
 
-	signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(jabber_plugin,
-			"jabber-receiving-iq", js->gc, iq_type, id, from, packet));
-	if (signal_return)
-		return;
-
 	/*
 	 * child will be either the first tag child or NULL if there is no child.
 	 * Historically, we used just the 'query' subchild, but newer XEPs use
@@ -345,6 +340,11 @@
 		return;
 	}
 
+	signal_return = GPOINTER_TO_INT(purple_signal_emit_return_1(jabber_plugin,
+			"jabber-receiving-iq", js->gc, iq_type, id, from, packet));
+	if (signal_return)
+		return;
+
 	/* First, lets see if a special callback got registered */
 	if(type == JABBER_IQ_RESULT || type == JABBER_IQ_ERROR) {
 		if((jcd = g_hash_table_lookup(js->iq_callbacks, id))) {