--- 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) {