summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_svc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-03 22:25:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-03 22:25:13 +0000
commit67e460ae2bf43109b9095c518cd2ede4e043e202 (patch)
treed4b6afb98a75fa4142b2980b792e92ee8f8fc11a /protocols/JabberG/src/jabber_svc.cpp
parent784c2757e8c791b4c76a6e739f08b0fb92ec093a (diff)
ptrT/A/W is used everywhere instead of DBVARIANT to read database strings
git-svn-id: http://svn.miranda-ng.org/main/trunk@6322 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_svc.cpp')
-rw-r--r--protocols/JabberG/src/jabber_svc.cpp33
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;
}