Mercurial > pidgin.yaz
changeset 27616:d953b613a794
Fix picking up SI streamhosts from login server and plug a leak.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Tue, 14 Jul 2009 22:47:42 +0000 |
parents | 32d2caa6a777 |
children | 205267108d6e |
files | libpurple/protocols/jabber/disco.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/disco.c Tue Jul 14 19:55:40 2009 +0000 +++ b/libpurple/protocols/jabber/disco.c Tue Jul 14 22:47:42 2009 +0000 @@ -297,7 +297,8 @@ if(jbr) jbr->capabilities = capabilities; - jdicd->callback(js, from, capabilities, jdicd->data); + if (jdicd && jdicd->callback) + jdicd->callback(js, from, capabilities, jdicd->data); } else { /* type == JABBER_IQ_ERROR or query == NULL */ JabberID *jid; JabberBuddy *jb; @@ -313,8 +314,11 @@ if(jbr) capabilities = jbr->capabilities; - jdicd->callback(js, from, capabilities, jdicd->data); + if (jdicd && jdicd->callback) + jdicd->callback(js, from, capabilities, jdicd->data); } + + g_free(jdicd); } void jabber_disco_items_parse(JabberStream *js, const char *from, @@ -515,6 +519,7 @@ iq = jabber_iq_new_query(js, JABBER_IQ_GET, "http://jabber.org/protocol/disco#info"); xmlnode_set_attrib(iq->node, "to", jid); + jabber_iq_set_callback(iq, jabber_disco_info_cb, NULL); jabber_iq_send(iq); } }