diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-03 20:11:26 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-03 20:11:26 +0000 |
commit | e84b97a0622a26fe474ccd840dcadb320520601c (patch) | |
tree | 7c1725e6eddbb47d618c8574147dd998feb8ea52 /protocols/GTalkExt/src/inbox.cpp | |
parent | e82c4d5d574191f432716049218b4b7b5162ec38 (diff) |
- 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
Diffstat (limited to 'protocols/GTalkExt/src/inbox.cpp')
-rw-r--r-- | protocols/GTalkExt/src/inbox.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
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)
|