From 25ec54ea27a7099f33573b260a620ed7273176fe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Jun 2013 12:16:44 +0000 Subject: - 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 --- plugins/SecureIM/src/crypt_dll.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'plugins/SecureIM/src/crypt_dll.cpp') 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); -- cgit v1.2.3