diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_svc.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_svc.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index cea9a5b30d..fa5ff7d13e 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -540,23 +540,22 @@ INT_PTR __cdecl CJabberProto::JabberSendNudge(WPARAM wParam, LPARAM) return 0;
HANDLE hContact = (HANDLE)wParam;
- DBVARIANT dbv;
- if ( !getTString(hContact, "jid", &dbv)) {
- TCHAR tszJid[JABBER_MAX_JID_LEN];
- TCHAR *szResource = ListGetBestClientResourceNamePtr(dbv.ptszVal);
- if (szResource)
- mir_sntprintf(tszJid, SIZEOF(tszJid), _T("%s/%s"), dbv.ptszVal, szResource);
- else
- mir_sntprintf(tszJid, SIZEOF(tszJid), _T("%s"), dbv.ptszVal);
- db_free(&dbv);
-
- JabberCapsBits jcb = GetResourceCapabilites(tszJid, FALSE);
-
- m_ThreadInfo->send(
- XmlNode(_T("message")) << XATTR(_T("type"), _T("headline")) << XATTR(_T("to"), tszJid)
- << XCHILDNS(_T("attention"),
- jcb & JABBER_CAPS_ATTENTION ? JABBER_FEAT_ATTENTION : JABBER_FEAT_ATTENTION_0));
- }
+ ptrT jid( getTStringA(hContact, "jid"));
+ if (jid == NULL)
+ return 0;
+
+ TCHAR tszJid[JABBER_MAX_JID_LEN];
+ TCHAR *szResource = ListGetBestClientResourceNamePtr(jid);
+ if (szResource)
+ mir_sntprintf(tszJid, SIZEOF(tszJid), _T("%s/%s"), jid, szResource);
+ else
+ mir_sntprintf(tszJid, SIZEOF(tszJid), _T("%s"), jid);
+
+ JabberCapsBits jcb = GetResourceCapabilites(tszJid, FALSE);
+ m_ThreadInfo->send(
+ XmlNode(_T("message")) << XATTR(_T("type"), _T("headline")) << XATTR(_T("to"), tszJid)
+ << XCHILDNS(_T("attention"),
+ (jcb & JABBER_CAPS_ATTENTION) ? JABBER_FEAT_ATTENTION : JABBER_FEAT_ATTENTION_0));
return 0;
}
|