summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/options.cpp
diff options
context:
space:
mode:
authorAlexander Gluzsky <sss123next@list.ru>2013-01-12 06:34:11 +0000
committerAlexander Gluzsky <sss123next@list.ru>2013-01-12 06:34:11 +0000
commite7c4081ac0449d998b274d46e6869f69abdecf36 (patch)
treed14d616c2648324439a09e0b098cdefc33dd52b5 /plugins/New_GPG/src/options.cpp
parent347b22f4feab779fe808f3dcfd93206a85e497ed (diff)
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
Diffstat (limited to 'plugins/New_GPG/src/options.cpp')
-rwxr-xr-xplugins/New_GPG/src/options.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index 9d4e1da893..6b26457864 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -278,7 +278,8 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
gpg_thread.~thread();
TerminateProcess(params.hProcess, 1);
params.hProcess = NULL;
- debuglog<<std::string(time_str()+": GPG execution timed out, aborted");
+ if(bDebugLog)
+ debuglog<<std::string(time_str()+": GPG execution timed out, aborted");
mir_free(tmp);
break;
}
@@ -458,7 +459,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case PSN_APPLY:
{
- extern bool bDebugLog, bJabberAPI, bFileTransfers;
+ extern bool bJabberAPI, bFileTransfers;
bDebugLog = CheckStateStoreDB(hwndDlg, IDC_DEBUG_LOG, "bDebugLog");
if(bDebugLog)
debuglog.init();
@@ -843,7 +844,8 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
gpg_thread.~thread();
TerminateProcess(params.hProcess, 1);
params.hProcess = NULL;
- debuglog<<std::string(time_str()+": GPG execution timed out, aborted");
+ if(bDebugLog)
+ debuglog<<std::string(time_str()+": GPG execution timed out, aborted");
}
if((out.find("-----BEGIN PGP PUBLIC KEY BLOCK-----") != string::npos) && (out.find("-----END PGP PUBLIC KEY BLOCK-----") != string::npos))
{
@@ -996,7 +998,8 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
gpg_thread.~thread();
TerminateProcess(params.hProcess, 1);
params.hProcess = NULL;
- debuglog<<std::string(time_str()+": GPG execution timed out, aborted");
+ if(bDebugLog)
+ debuglog<<std::string(time_str()+": GPG execution timed out, aborted");
break;
}
if(result == pxNotFound)
@@ -1243,7 +1246,8 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
gpg_thread.~thread();
TerminateProcess(params.hProcess, 1);
params.hProcess = NULL;
- debuglog<<std::string(time_str()+": GPG execution timed out, aborted");
+ if(bDebugLog)
+ debuglog<<std::string(time_str()+": GPG execution timed out, aborted");
break;
}
if(result == pxNotFound)
@@ -1330,7 +1334,8 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
if(key_buf.empty())
{
key_buf.clear();
- debuglog<<std::string(time_str()+": info: Failed to read key file");
+ if(bDebugLog)
+ debuglog<<std::string(time_str()+": info: Failed to read key file");
break;
}
ws2 = key_buf.find(_T("-----END PGP PUBLIC KEY BLOCK-----"));