summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index 80674a1625..e9ec8262d4 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -35,18 +35,20 @@ int CJabberProto::SendGetVcard(MCONTACT hContact)
{
if (!m_bJabberOnline) return 0;
- CMStringA jid;
+ CJabberIqInfo *pInfo;
+
if (hContact == 0) {
- jid = m_szJabberJID;
setDword("LastGetVcard", time(0));
+ pInfo = AddIQ(&CJabberProto::OnIqResultGetVcard, JABBER_IQ_TYPE_GET, m_szJabberJID);
}
else {
- jid = getMStringA(hContact, "jid");
- if (jid.IsEmpty())
+ ptrA jid(getUStringA(hContact, "jid"));
+ if (jid == nullptr)
return -1;
+
+ pInfo = AddIQ(&CJabberProto::OnIqResultGetVcard, JABBER_IQ_TYPE_GET, jid);
}
- CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultGetVcard, JABBER_IQ_TYPE_GET, jid);
m_ThreadInfo->send(XmlNodeIq(pInfo) << XCHILDNS("vCard", JABBER_FEAT_VCARD_TEMP)
<< XATTR("prodid", "-//HandGen//NONSGML vGen v1.0//EN") << XATTR("version", "2.0"));