From e84b97a0622a26fe474ccd840dcadb320520601c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 3 Feb 2014 20:11:26 +0000 Subject: - new helpers for reading db strings into static buffers; - MS_DB_CONTACT_GETSETTINGSTATIC died; - DBCONTACTGETSETTING is detouched from all services; - these service calls are rewritten using parameters git-svn-id: http://svn.miranda-ng.org/main/trunk@8035 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/GTalkExt/src/inbox.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'protocols/GTalkExt') diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 1cb4a3aa88..51a0cf5ddd 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -158,19 +158,10 @@ void OpenUrlThread(void *param) int GetMailboxPwd(LPCSTR acc, LPCTSTR mailbox, LPSTR *pwd, int buffSize) { char buff[256]; - - DBCONTACTGETSETTING cgs; - DBVARIANT dbv; - cgs.szModule = acc; - cgs.szSetting = LOGIN_PASS_SETTING_NAME; - cgs.pValue = &dbv; - dbv.type = DBVT_ASCIIZ; - dbv.pszVal = &buff[0]; - dbv.cchVal = sizeof(buff); - if (CallService(MS_DB_CONTACT_GETSETTINGSTATIC, 0, (LPARAM)&cgs)) + if (db_get_static(NULL, acc, LOGIN_PASS_SETTING_NAME, buff, sizeof(buff))) return 0; - int result = dbv.cchVal; + int result = (int)strlen(buff); if (pwd) { if (buffSize < result + 1) -- cgit v1.2.3