libpurple/protocols/jabber/pep.c

branch
soc.2007.xmpp
changeset 17789
f75d542850e3
parent 17788
e6e381b0c7d6
child 17793
ff1053411f5a
--- a/libpurple/protocols/jabber/pep.c	Sun Jun 17 03:51:19 2007 +0000
+++ b/libpurple/protocols/jabber/pep.c	Sun Jun 17 04:05:28 2007 +0000
@@ -49,20 +49,13 @@
 static void do_pep_iq_request_item_callback(JabberStream *js, xmlnode *packet, gpointer data) {
 	const char *from = xmlnode_get_attrib(packet,"from");
 	xmlnode *pubsub = xmlnode_get_child_with_namespace(packet,"pubsub","http://jabber.org/protocol/pubsub#event");
-	xmlnode *item = NULL;
+	xmlnode *items = NULL;
 	JabberPEPHandler *cb = data;
 	
-	if(pubsub) {
-		item = xmlnode_get_child(pubsub, "item");
-		if(!item) {
-			/* does not follow the spec, but the ejabberd PEP implementation behaves that way */
-			xmlnode *items = xmlnode_get_child(pubsub, "items");
-			if(items)
-				item = xmlnode_get_child(items, "item");
-		}
-	}
+	if(pubsub)
+		items = xmlnode_get_child(pubsub, "items");
 	
-	cb(js, from, item);
+	cb(js, from, items);
 }
 
 void jabber_pep_request_item(JabberStream *js, const char *to, const char *node, const char *id, JabberPEPHandler cb) {

mercurial