diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-17 15:06:11 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-17 15:06:11 +0000 |
commit | 82ae452fff08430d514f762f49e78fec90f88625 (patch) | |
tree | 184c31c029a364eec13b58d060d20ba85b2a20bc /plugins/SecureIM/src/crypt_dll.cpp | |
parent | 15267ea2d489606fb4b99d011bc3ea7c2a644a9f (diff) |
- rest of memory leaks
- code cleaning;
git-svn-id: http://svn.miranda-ng.org/main/trunk@4078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src/crypt_dll.cpp')
-rw-r--r-- | plugins/SecureIM/src/crypt_dll.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/SecureIM/src/crypt_dll.cpp b/plugins/SecureIM/src/crypt_dll.cpp index f81ea8ad3a..3a2e5ad6a3 100644 --- a/plugins/SecureIM/src/crypt_dll.cpp +++ b/plugins/SecureIM/src/crypt_dll.cpp @@ -9,7 +9,7 @@ LPSTR InitKeyA(pUinKey ptr,int features) { if ( !ptr->cntx )
ptr->cntx = cpp_create_context(isProtoSmallPackets(ptr->hContact)?CPP_MODE_BASE64:0);
- char *tmp = myDBGetString(ptr->hContact,szModuleName,"PSK");
+ char *tmp = myDBGetString(ptr->hContact,MODULENAME,"PSK");
if (tmp) {
cpp_init_keyp(ptr->cntx,tmp); // make pre-shared key from password
mir_free(tmp);
@@ -50,7 +50,7 @@ int InitKeyB(pUinKey ptr,LPCSTR key) { ptr->cntx = cpp_create_context(isProtoSmallPackets(ptr->hContact)?CPP_MODE_BASE64:0);
if (!cpp_keyp(ptr->cntx)) {
- char *tmp = myDBGetString(ptr->hContact,szModuleName,"PSK");
+ char *tmp = myDBGetString(ptr->hContact,MODULENAME,"PSK");
if (tmp) {
cpp_init_keyp(ptr->cntx,tmp); // make pre-shared key from password
mir_free(tmp);
@@ -88,7 +88,7 @@ BOOL CalculateKeyX(pUinKey ptr,HANDLE hContact) { cpp_get_keyx(ptr->cntx,buffer);
DBCONTACTWRITESETTING cws;
- cws.szModule = szModuleName;
+ cws.szModule = MODULENAME;
// store key in database
cws.szSetting = "offlineKey";
@@ -100,7 +100,7 @@ BOOL CalculateKeyX(pUinKey ptr,HANDLE hContact) { // store timeout of key in database (2 days)
cws.szSetting = "offlineKeyTimeout";
cws.value.type = DBVT_DWORD;
- cws.value.dVal = gettime()+(60*60*24*DBGetContactSettingWord(0,szModuleName,"okt",2));
+ cws.value.dVal = gettime()+(60*60*24*DBGetContactSettingWord(0,MODULENAME,"okt",2));
CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)hContact, (LPARAM)&cws);
// key exchange is finished
@@ -200,10 +200,10 @@ LPSTR decodeMsg(pUinKey ptr, LPARAM lParam, LPSTR szEncMsg) { BOOL LoadKeyPGP(pUinKey ptr) {
- int mode = db_get_b(ptr->hContact,szModuleName,"pgp_mode",255);
+ int mode = db_get_b(ptr->hContact,MODULENAME,"pgp_mode",255);
if (mode==0) {
DBVARIANT dbv;
- DBGetContactSetting(ptr->hContact,szModuleName,"pgp",&dbv);
+ DBGetContactSetting(ptr->hContact,MODULENAME,"pgp",&dbv);
BOOL r=(dbv.type==DBVT_BLOB);
if (r) pgp_set_keyid(ptr->cntx,(PVOID)dbv.pbVal);
DBFreeVariant(&dbv);
@@ -211,7 +211,7 @@ BOOL LoadKeyPGP(pUinKey ptr) { }
else
if (mode==1) {
- LPSTR key = myDBGetStringDecode(ptr->hContact,szModuleName,"pgp");
+ LPSTR key = myDBGetStringDecode(ptr->hContact,MODULENAME,"pgp");
if ( key ) {
pgp_set_key(ptr->cntx,key);
mir_free(key);
@@ -224,7 +224,7 @@ BOOL LoadKeyPGP(pUinKey ptr) { BOOL LoadKeyGPG(pUinKey ptr) {
- LPSTR key = myDBGetString(ptr->hContact,szModuleName,"gpg");
+ LPSTR key = myDBGetString(ptr->hContact,MODULENAME,"gpg");
if ( key ) {
gpg_set_keyid(ptr->cntx,key);
mir_free(key);
|