summaryrefslogtreecommitdiff
path: root/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'options.cpp')
-rwxr-xr-xoptions.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/options.cpp b/options.cpp
index 63cccf5..b0fe543 100755
--- a/options.cpp
+++ b/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();
@@ -764,7 +765,6 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
{
static HANDLE hContact;
TCHAR *tmp = NULL;
-
wstring key_buf;
wstring::size_type ws1 = 0, ws2 = 0;
switch (msg)
@@ -844,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))
{
@@ -997,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)
@@ -1244,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)
@@ -1331,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-----"));