diff options
Diffstat (limited to 'gpg_wrapper.cpp')
-rw-r--r-- | gpg_wrapper.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gpg_wrapper.cpp b/gpg_wrapper.cpp index 04f3512..8ab32a3 100644 --- a/gpg_wrapper.cpp +++ b/gpg_wrapper.cpp @@ -24,6 +24,8 @@ boost::mutex gpg_mutex; pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD aexitcode, pxResult *result) { gpg_mutex.lock(); + if(!gpg_configured) + return pxNotConfigured; extern logtofile debuglog; BOOL success; STARTUPINFO sinfo = {0}; @@ -97,7 +99,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD delete [] home_dir; } - debuglog<<"gpg in: "<<commandline<<"\n"; + debuglog<<time_str()<<": gpg in: "<<commandline; success = CreateProcess(NULL, (TCHAR*)commandline.c_str(), NULL, NULL, TRUE, CREATE_NEW_CONSOLE | CREATE_UNICODE_ENVIRONMENT, (void*)_T("LANGUAGE=en@quot\0LC_ALL=English\0"), NULL, &sinfo, &pri); @@ -134,7 +136,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD storeOutput(readstdout,aoutput); - debuglog<<"gpg out: "<<aoutput->c_str()<<"\n"; + debuglog<<time_str()<<": gpg out: "<<aoutput->c_str(); WaitForSingleObject(pri.hProcess,INFINITE); @@ -155,6 +157,6 @@ void pxEexcute_thread(void *param) pxResult result = pxExecute(params->cmd, params->useless, params->out, params->code, params->result); if(result == pxNotFound) { - MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK); + debuglog<<time_str()<<": Gpg binary not found"; } }
|