diff libpurple/protocols/jabber/pep.c @ 26873:5872d1bc546f

On errors, don't pretend we did fetch something, pass NULL.
author Paul Aurich <paul@darkrain42.org>
date Sun, 03 May 2009 06:38:16 +0000
parents 3912f55a1633
children 1dfa009f6db5
line wrap: on
line diff
--- a/libpurple/protocols/jabber/pep.c	Sun May 03 06:36:05 2009 +0000
+++ b/libpurple/protocols/jabber/pep.c	Sun May 03 06:38:16 2009 +0000
@@ -67,12 +67,15 @@
                                 JabberIqType type, const char *id,
                                 xmlnode *packet, gpointer data)
 {
-	xmlnode *pubsub = xmlnode_get_child_with_namespace(packet,"pubsub","http://jabber.org/protocol/pubsub");
+	xmlnode *pubsub;
 	xmlnode *items = NULL;
 	JabberPEPHandler *cb = data;
 
-	if(pubsub)
-		items = xmlnode_get_child(pubsub, "items");
+	if (type == JABBER_IQ_RESULT) {
+		pubsub = xmlnode_get_child_with_namespace(packet, "pubsub", "http://jabber.org/protocol/pubsub");
+		if(pubsub)
+			items = xmlnode_get_child(pubsub, "items");
+	}
 
 	cb(js, from, items);
 }