summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_icolib.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_icolib.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_icolib.cpp')
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp
index 36994181cf..bc76f927c5 100644
--- a/protocols/JabberG/src/jabber_icolib.cpp
+++ b/protocols/JabberG/src/jabber_icolib.cpp
@@ -344,7 +344,7 @@ int CJabberProto::LoadAdvancedIcons(int iID)
int CJabberProto::GetTransportProtoID(TCHAR* TransportDomain)
{
for (int i=0; i<SIZEOF(TransportProtoTable); i++)
- if (MatchMask(TransportDomain, TransportProtoTable[i].mask))
+ if ( MatchMask(TransportDomain, TransportProtoTable[i].mask))
return i;
return -1;
@@ -399,21 +399,16 @@ INT_PTR __cdecl CJabberProto::JGetAdvancedStatusIcon(WPARAM wParam, LPARAM)
if ( !getByte(hContact, "IsTransported", 0))
return -1;
- DBVARIANT dbv;
- if (getTString(hContact, "Transport", &dbv))
+ int iID = GetTransportProtoID( ptrT( getTStringA(hContact, "Transport")));
+ if (iID < 0)
return -1;
- int iID = GetTransportProtoID(dbv.ptszVal);
- db_free(&dbv);
- if (iID >= 0) {
- WORD Status = getWord(hContact, "Status", ID_STATUS_OFFLINE);
- if (Status < ID_STATUS_OFFLINE)
- Status = ID_STATUS_OFFLINE;
- else if (Status > ID_STATUS_INVISIBLE)
- Status = ID_STATUS_ONLINE;
- return GetTransportStatusIconIndex(iID, Status);
- }
- return -1;
+ WORD Status = getWord(hContact, "Status", ID_STATUS_OFFLINE);
+ if (Status < ID_STATUS_OFFLINE)
+ Status = ID_STATUS_OFFLINE;
+ else if (Status > ID_STATUS_INVISIBLE)
+ Status = ID_STATUS_ONLINE;
+ return GetTransportStatusIconIndex(iID, Status);
}
/////////////////////////////////////////////////////////////////////////////////////////