diff options
Diffstat (limited to 'messages.cpp')
-rw-r--r-- | messages.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/messages.cpp b/messages.cpp index 3426b5e..226445a 100644 --- a/messages.cpp +++ b/messages.cpp @@ -156,6 +156,7 @@ int RecvMsgSvc_func(HANDLE hContact, std::wstring str, char *msg, DWORD flags) if(!gpg_thread->timed_join(boost::posix_time::seconds(10))) { delete gpg_thread; + TerminateProcess(params.hProcess, 1); debuglog<<time_str()<<": GPG execution timed out, aborted\n"; DeleteFile(path.c_str()); HistoryLog(hContact, msg, EVENTTYPE_MESSAGE, dbflags); @@ -205,6 +206,7 @@ int RecvMsgSvc_func(HANDLE hContact, std::wstring str, char *msg, DWORD flags) if(!gpg_thread->timed_join(boost::posix_time::seconds(10))) { delete gpg_thread; + TerminateProcess(params.hProcess, 1); debuglog<<time_str()<<": GPG execution timed out, aborted\n"; DeleteFile(path.c_str()); HistoryLog(hContact, msg, EVENTTYPE_MESSAGE, dbflags); @@ -222,6 +224,7 @@ int RecvMsgSvc_func(HANDLE hContact, std::wstring str, char *msg, DWORD flags) if(!gpg_thread->timed_join(boost::posix_time::seconds(10))) { delete gpg_thread; + TerminateProcess(params.hProcess, 1); debuglog<<time_str()<<": GPG execution timed out, aborted\n"; DeleteFile(path.c_str()); HistoryLog(hContact, msg, EVENTTYPE_MESSAGE, dbflags); @@ -385,6 +388,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l) if(!gpg_thread.timed_join(boost::posix_time::seconds(10))) { gpg_thread.~thread(); + TerminateProcess(params.hProcess, 1); debuglog<<time_str()<<": GPG execution timed out, aborted\n"; return 1; } @@ -638,6 +642,7 @@ int SendMsgSvc_func(HANDLE hContact, char *msg, DWORD flags) if(!gpg_thread.timed_join(boost::posix_time::seconds(10))) { gpg_thread.~thread(); + TerminateProcess(params.hProcess, 1); debuglog<<time_str()<<": GPG execution timed out, aborted\n"; mir_free(msg); return CallContactService(hContact, PSS_MESSAGE, (WPARAM)flags, (LPARAM)msg); @@ -665,6 +670,7 @@ int SendMsgSvc_func(HANDLE hContact, char *msg, DWORD flags) if(!gpg_thread.timed_join(boost::posix_time::seconds(10))) { gpg_thread.~thread(); + TerminateProcess(params.hProcess, 1); debuglog<<time_str()<<": GPG execution timed out, aborted\n"; mir_free(msg); return CallContactService(hContact, PSS_MESSAGE, (WPARAM)flags, (LPARAM)msg); |