From 913374a19774643fb97455d0a294a26a93019557 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sat, 12 Jan 2013 09:08:03 +0200 Subject: merged with miranda_ng main repo --- src/utilities.cpp | 97 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 47 deletions(-) (limited to 'src/utilities.cpp') diff --git a/src/utilities.cpp b/src/utilities.cpp index e208c4a..ef9d1be 100755 --- a/src/utilities.cpp +++ b/src/utilities.cpp @@ -405,13 +405,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) @@ -422,12 +422,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); @@ -447,7 +448,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 @@ -475,7 +478,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("\" "); @@ -495,7 +499,8 @@ int onProtoAck(WPARAM w, LPARAM l) delete gpg_thread; TerminateProcess(params.hProcess, 1); params.hProcess = NULL; - debuglog<