libpurple/protocols/jabber/pep.c

changeset 27016
1e21b1e058c0
parent 26958
a955bd42f529
child 27028
1a2ef7ddb463
equal deleted inserted replaced
27015:3d6982f39a5b 27016:1e21b1e058c0
65 static void 65 static void
66 do_pep_iq_request_item_callback(JabberStream *js, const char *from, 66 do_pep_iq_request_item_callback(JabberStream *js, const char *from,
67 JabberIqType type, const char *id, 67 JabberIqType type, const char *id,
68 xmlnode *packet, gpointer data) 68 xmlnode *packet, gpointer data)
69 { 69 {
70 xmlnode *pubsub = xmlnode_get_child_with_namespace(packet,"pubsub","http://jabber.org/protocol/pubsub"); 70 xmlnode *pubsub;
71 xmlnode *items = NULL; 71 xmlnode *items = NULL;
72 JabberPEPHandler *cb = data; 72 JabberPEPHandler *cb = data;
73 73
74 if(pubsub) 74 if (type == JABBER_IQ_RESULT) {
75 items = xmlnode_get_child(pubsub, "items"); 75 pubsub = xmlnode_get_child_with_namespace(packet, "pubsub", "http://jabber.org/protocol/pubsub");
76 if(pubsub)
77 items = xmlnode_get_child(pubsub, "items");
78 }
76 79
77 cb(js, from, items); 80 cb(js, from, items);
78 } 81 }
79 82
80 void jabber_pep_request_item(JabberStream *js, const char *to, const char *node, const char *id, JabberPEPHandler cb) { 83 void jabber_pep_request_item(JabberStream *js, const char *to, const char *node, const char *id, JabberPEPHandler cb) {

mercurial