# HG changeset patch # User Paul Aurich # Date 1241332696 0 # Node ID 5872d1bc546f7d337b1b744d4342cfab230612db # Parent 6a177edc401ea1465a02a0e228c70ca57c85ae47 On errors, don't pretend we did fetch something, pass NULL. diff -r 6a177edc401e -r 5872d1bc546f libpurple/protocols/jabber/pep.c --- 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); } diff -r 6a177edc401e -r 5872d1bc546f libpurple/protocols/jabber/usernick.c --- a/libpurple/protocols/jabber/usernick.c Sun May 03 06:36:05 2009 +0000 +++ b/libpurple/protocols/jabber/usernick.c Sun May 03 06:38:16 2009 +0000 @@ -65,7 +65,10 @@ static void do_nick_got_own_nick_cb(JabberStream *js, const char *from, xmlnode *items) { char *oldnickname = NULL; - xmlnode *item = xmlnode_get_child(items,"item"); + xmlnode *item = NULL; + + if (items) + item = xmlnode_get_child(items,"item"); if(item) { xmlnode *nick = xmlnode_get_child_with_namespace(item,"nick","http://jabber.org/protocol/nick");