diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-30 12:16:44 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-30 12:16:44 +0000 |
commit | 25ec54ea27a7099f33573b260a620ed7273176fe (patch) | |
tree | 1810a0cb35d23deeed9ccdaf0ab276a4022f9a41 /plugins/SecureIM/src/crypt_dll.cpp | |
parent | a546606709e6bb72e01eb38b2c8c8756608fd5d6 (diff) |
- db_set_blob used everywhere for writing blobs
- DBCONTACTWRITESETTING left only in the event handlers
git-svn-id: http://svn.miranda-ng.org/main/trunk@5191 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src/crypt_dll.cpp')
-rw-r--r-- | plugins/SecureIM/src/crypt_dll.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/plugins/SecureIM/src/crypt_dll.cpp b/plugins/SecureIM/src/crypt_dll.cpp index 4b3c73c088..05220acf99 100644 --- a/plugins/SecureIM/src/crypt_dll.cpp +++ b/plugins/SecureIM/src/crypt_dll.cpp @@ -87,21 +87,11 @@ BOOL CalculateKeyX(pUinKey ptr,HANDLE hContact) { // store key
cpp_get_keyx(ptr->cntx,buffer);
- DBCONTACTWRITESETTING cws;
- cws.szModule = MODULENAME;
-
// store key in database
- cws.szSetting = "offlineKey";
- cws.value.type = DBVT_BLOB;
- cws.value.cpbVal = keysize;
- cws.value.pbVal = buffer;
- CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)hContact, (LPARAM)&cws);
+ db_set_blob(hContact, MODULENAME, "offlineKey", buffer, keysize);
// store timeout of key in database (2 days)
- cws.szSetting = "offlineKeyTimeout";
- cws.value.type = DBVT_DWORD;
- cws.value.dVal = gettime()+(60*60*24*db_get_w(0,MODULENAME,"okt",2));
- CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)hContact, (LPARAM)&cws);
+ db_set_dw(hContact, MODULENAME, "offlineKeyTimeout", gettime()+(60*60*24*db_get_w(0,MODULENAME,"okt",2)));
// key exchange is finished
showPopupEC(ptr->hContact);
|