Mercurial > hg
changeset 1310:a5336c44d4e2
Allow vcard requests to a full jid
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 10 Sep 2007 21:56:50 +0200 |
parents | 887f8801418c |
children | 0dda8238af21 |
files | mcabber/src/jab_iq.c mcabber/src/jabglue.c |
diffstat | 2 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/jab_iq.c Mon Sep 10 19:52:43 2007 +0200 +++ b/mcabber/src/jab_iq.c Mon Sep 10 21:56:50 2007 +0200 @@ -676,22 +676,17 @@ void request_vcard(const char *bjid) { eviqs *iqn; - char *barejid; - - barejid = jidtodisp(bjid); // Create a new IQ structure. We use NULL for the namespace because // we'll have to use a special tag, not the usual "query" one. iqn = iqs_new(JPACKET__GET, NULL, "vcard", IQS_DEFAULT_TIMEOUT); - xmlnode_put_attrib(iqn->xmldata, "to", barejid); + xmlnode_put_attrib(iqn->xmldata, "to", bjid); // Remove the useless <query/> tag, and insert a vCard one. xmlnode_hide(xmlnode_get_tag(iqn->xmldata, "query")); xmlnode_put_attrib(xmlnode_insert_tag(iqn->xmldata, "vCard"), "xmlns", NS_VCARD); iqn->callback = &iqscallback_vcard; jab_send(jc, iqn->xmldata); - - g_free(barejid); } static void storage_bookmarks_parse_conference(xmlnode xmldata)
--- a/mcabber/src/jabglue.c Mon Sep 10 19:52:43 2007 +0200 +++ b/mcabber/src/jabglue.c Mon Sep 10 21:56:50 2007 +0200 @@ -1126,10 +1126,8 @@ // vCard request if (reqtype == iqreq_vcard) { - char *bjid = jidtodisp(fjid); - request_vcard(bjid); - scr_LogPrint(LPRINT_NORMAL, "Sent vCard request to <%s>", bjid); - g_free(bjid); + request_vcard(fjid); + scr_LogPrint(LPRINT_NORMAL, "Sent vCard request to <%s>", fjid); return; }