From e7c4081ac0449d998b274d46e6869f69abdecf36 Mon Sep 17 00:00:00 2001 From: Alexander Gluzsky Date: Sat, 12 Jan 2013 06:34:11 +0000 Subject: additional private keys checks additional debug and error messages improoved debug logging removed metacontcats encodings problem workaround git-svn-id: http://svn.miranda-ng.org/main/trunk@3062 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/New_GPG/src/utilities.cpp | 97 ++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 47 deletions(-) (limited to 'plugins/New_GPG/src/utilities.cpp') diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index 11e53b091f..7a44ad992f 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -356,13 +356,13 @@ int onProtoAck(WPARAM w, LPARAM l) dbsetting += keyid; dbsetting += "_Password"; pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), _T("")); - if(_tcslen(pass) > 0) + if(_tcslen(pass) > 0 && bDebugLog) debuglog<hContact, GCDNF_TCHAR))+" with password"); } else { pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T("")); - if(_tcslen(pass) > 0) + if(_tcslen(pass) > 0 && bDebugLog) debuglog<hContact, GCDNF_TCHAR))+" with password"); } if(_tcslen(pass) > 0) @@ -373,12 +373,13 @@ int onProtoAck(WPARAM w, LPARAM l) } else if(password) { - debuglog<hContact, GCDNF_TCHAR))+" with password"); + if(bDebugLog) + debuglog<hContact, GCDNF_TCHAR))+" with password"); cmd += _T("--passphrase \""); cmd += password; cmd += _T("\" "); } - else + else if (bDebugLog) debuglog<hContact, GCDNF_TCHAR))+" with out password"); mir_free(pass); mir_free(keyid); @@ -398,7 +399,8 @@ int onProtoAck(WPARAM w, LPARAM l) delete gpg_thread; TerminateProcess(params.hProcess, 1); params.hProcess = NULL; - debuglog<hContact, GCDNF_TCHAR))+" password needed, trying to get one"); + if(bDebugLog) + debuglog<hContact, GCDNF_TCHAR))+" password needed, trying to get one"); if(_terminate) break; { //save inkey id @@ -426,7 +429,8 @@ int onProtoAck(WPARAM w, LPARAM l) wstring cmd2 = cmd; if(password) { - debuglog<hContact, GCDNF_TCHAR))); + if(bDebugLog) + debuglog<hContact, GCDNF_TCHAR))); wstring tmp = _T("--passphrase \""); tmp += password; tmp += _T("\" "); @@ -446,7 +450,8 @@ int onProtoAck(WPARAM w, LPARAM l) delete gpg_thread; TerminateProcess(params.hProcess, 1); params.hProcess = NULL; - debuglog<