summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_db.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icq_db.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/protocols/IcqOscarJ/src/icq_db.cpp b/protocols/IcqOscarJ/src/icq_db.cpp
index ecf76ebfc4..8841ce24fc 100644
--- a/protocols/IcqOscarJ/src/icq_db.cpp
+++ b/protocols/IcqOscarJ/src/icq_db.cpp
@@ -107,27 +107,10 @@ WORD CIcqProto::getContactStatus(HANDLE hContact)
int CIcqProto::getSettingStringStatic(HANDLE hContact, const char *szSetting, char *dest, int dest_len)
{
- DBVARIANT dbv = {DBVT_DELETED};
- DBCONTACTGETSETTING sVal = {0};
-
- dbv.pszVal = dest;
- dbv.cchVal = dest_len;
- dbv.type = DBVT_ASCIIZ;
-
- sVal.pValue = &dbv;
- sVal.szModule = m_szModuleName;
- sVal.szSetting = szSetting;
-
- if (CallService(MS_DB_CONTACT_GETSETTINGSTATIC, (WPARAM)hContact, (LPARAM)&sVal) != 0) {
- dbv.pszVal = dest;
- dbv.cchVal = dest_len;
- dbv.type = DBVT_UTF8;
-
- if (CallService(MS_DB_CONTACT_GETSETTINGSTATIC, (WPARAM)hContact, (LPARAM)&sVal) != 0)
- return 1; // nothing found
- }
+ if (!db_get_static(hContact, m_szModuleName, szSetting, dest, dest_len))
+ return 0;
- return (dbv.type != DBVT_ASCIIZ);
+ return db_get_static_utf(hContact, m_szModuleName, szSetting, dest, dest_len);
}
int CIcqProto::setSettingDouble(HANDLE hContact, const char *szSetting, double dValue)