summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src/crypt_dll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SecureIM/src/crypt_dll.cpp')
-rw-r--r--plugins/SecureIM/src/crypt_dll.cpp14
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);