comparison libpurple/protocols/jabber/presence.c @ 25782:6bdcdb77ce77

Reference-count JabberCapsClientInfo and fix bug. jabber_caps_get_info() wouldn't ever actually trigger the callback if the data were already in the hash. Fix that + a leak of the lookup key and userdata.
author Paul Aurich <paul@darkrain42.org>
date Mon, 15 Dec 2008 20:43:02 +0000
parents e1f363f8fd6b
children 05693f6885a4
comparison
equal deleted inserted replaced
25781:ef90728dbae8 25782:6bdcdb77ce77
393 g_free(userdata->from); 393 g_free(userdata->from);
394 g_free(userdata); 394 g_free(userdata);
395 return; 395 return;
396 } 396 }
397 397
398 /* old value in jbr->caps is owned by caps code */ 398 jabber_caps_client_info_unref(jbr->caps);
399 jbr->caps = info; 399 jbr->caps = info;
400 400
401 if (jabber_resource_has_capability(jbr, "http://jabber.org/protocol/commands")) { 401 if (jabber_resource_has_capability(jbr, "http://jabber.org/protocol/commands")) {
402 JabberIq *iq = jabber_iq_new_query(userdata->js, JABBER_IQ_GET, "http://jabber.org/protocol/disco#items"); 402 JabberIq *iq = jabber_iq_new_query(userdata->js, JABBER_IQ_GET, "http://jabber.org/protocol/disco#items");
403 xmlnode *query = xmlnode_get_child_with_namespace(iq->node, "query", "http://jabber.org/protocol/disco#items"); 403 xmlnode *query = xmlnode_get_child_with_namespace(iq->node, "query", "http://jabber.org/protocol/disco#items");