summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icqosc_svcs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-29 18:16:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-29 18:16:23 +0000
commitde5dce707cc60ace5b92d2ac61914c590cb9680b (patch)
tree64f2ee6639edeefcc9a32425d10cd56463dab6a4 /protocols/IcqOscarJ/src/icqosc_svcs.cpp
parent13952bddf4931ed75338460754860a81d3710678 (diff)
rest of unused databases services removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@5181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/icqosc_svcs.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icqosc_svcs.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
index 2d140d8094..9442d860d6 100644
--- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp
+++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
@@ -89,15 +89,10 @@ INT_PTR CIcqProto::GetInfoSetting(WPARAM wParam, LPARAM lParam)
DBCONTACTGETSETTING *cgs = (DBCONTACTGETSETTING*)lParam;
BYTE type = cgs->pValue->type;
- cgs->pValue->type = 0; // original type without conversion
- INT_PTR rc = CallService(MS_DB_CONTACT_GETSETTING_STR, wParam, lParam);
-
+ DBVARIANT dbv = { 0 };
+ INT_PTR rc = db_get_s((HANDLE)wParam, cgs->szModule, cgs->szSetting, &dbv, 0);
if (!rc)
{ // Success
- DBVARIANT dbv;
-
- memcpy(&dbv, cgs->pValue, sizeof(DBVARIANT));
-
if (dbv.type == DBVT_BLOB)
{
cgs->pValue->pbVal = (BYTE*)mir_alloc(dbv.cpbVal);
@@ -742,23 +737,15 @@ INT_PTR __cdecl CIcqProto::IcqAddCapability(WPARAM wParam, LPARAM lParam)
INT_PTR __cdecl CIcqProto::IcqCheckCapability(WPARAM wParam, LPARAM lParam)
{
int res = 0;
- DBCONTACTGETSETTING dbcgs;
DBVARIANT dbvariant;
HANDLE hContact = (HANDLE)wParam;
ICQ_CUSTOMCAP *icqCustomCap = (ICQ_CUSTOMCAP *)lParam;
- dbcgs.pValue = &dbvariant;
- dbcgs.szModule = m_szModuleName;
- dbcgs.szSetting = "CapBuf";
-
- CallService(MS_DB_CONTACT_GETSETTING, (WPARAM)hContact, (LPARAM)&dbcgs);
+ db_get(hContact, m_szModuleName, "CapBuf", &dbvariant);
if (dbvariant.type == DBVT_BLOB)
- {
res = MatchCapability(dbvariant.pbVal, dbvariant.cpbVal, (const capstr*)&icqCustomCap->caps, 0x10)?1:0; // FIXME: Why icqCustomCap->caps is not capstr?
- }
-
- CallService(MS_DB_CONTACT_FREEVARIANT,0,(LPARAM)(DBVARIANT*)&dbvariant);
+ db_free(&dbvariant);
return res;
}