Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/presence.c @ 26931:e7819fa37224
Only try to fetch adhoc commands from buddies once. Pushed updates (which we support now) are far superior.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Fri, 08 May 2009 02:58:33 +0000 |
parents | d0a049ede31e |
children | 92565c8e1e3a |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c Fri May 08 02:50:17 2009 +0000 +++ b/libpurple/protocols/jabber/presence.c Fri May 08 02:58:33 2009 +0000 @@ -429,13 +429,15 @@ jbr->caps.info = info; jbr->caps.exts = exts; - if (jabber_resource_has_capability(jbr, "http://jabber.org/protocol/commands")) { + if (!jbr->commands_fetched && jabber_resource_has_capability(jbr, "http://jabber.org/protocol/commands")) { JabberIq *iq = jabber_iq_new_query(userdata->js, JABBER_IQ_GET, "http://jabber.org/protocol/disco#items"); xmlnode *query = xmlnode_get_child_with_namespace(iq->node, "query", "http://jabber.org/protocol/disco#items"); xmlnode_set_attrib(iq->node, "to", userdata->from); xmlnode_set_attrib(query, "node", "http://jabber.org/protocol/commands"); jabber_iq_set_callback(iq, jabber_adhoc_disco_result_cb, NULL); jabber_iq_send(iq); + + jbr->commands_fetched = TRUE; } g_free(userdata->from);