summaryrefslogtreecommitdiff
path: root/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utilities.cpp')
-rw-r--r--utilities.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/utilities.cpp b/utilities.cpp
index 43d5828..8a2fe53 100644
--- a/utilities.cpp
+++ b/utilities.cpp
@@ -379,6 +379,7 @@ int onProtoAck(WPARAM w, LPARAM l)
if(!gpg_thread->timed_join(boost::posix_time::minutes(15)))
{
delete gpg_thread;
+ TerminateProcess(params.hProcess, 1);
debuglog<<time_str()<<": GPG execution timed out, aborted\n";
return 0;
}
@@ -422,6 +423,7 @@ int onProtoAck(WPARAM w, LPARAM l)
if(!gpg_thread->timed_join(boost::posix_time::seconds(15)))
{
delete gpg_thread;
+ TerminateProcess(params.hProcess, 1);
debuglog<<time_str()<<": GPG execution timed out, aborted\n";
DeleteFile(filename);
return 0;
@@ -487,6 +489,7 @@ std::wstring encrypt_file(HANDLE hContact, TCHAR *filename)
if(!gpg_thread->timed_join(boost::posix_time::seconds(180)))
{
delete gpg_thread;
+ TerminateProcess(params.hProcess, 1);
debuglog<<time_str()<<": GPG execution timed out, aborted\n";
return 0;
}
@@ -501,6 +504,7 @@ std::wstring encrypt_file(HANDLE hContact, TCHAR *filename)
if(!gpg_thread->timed_join(boost::posix_time::seconds(180)))
{
delete gpg_thread;
+ TerminateProcess(params.hProcess, 1);
debuglog<<time_str()<<": GPG execution timed out, aborted\n";
return 0;
}
@@ -766,6 +770,7 @@ static JABBER_HANDLER_FUNC SendHandler(IJabberInterface *ji, HXML node, void *pU
if(!gpg_thread.timed_join(boost::posix_time::seconds(15)))
{
gpg_thread.~thread();
+ TerminateProcess(params.hProcess, 1);
debuglog<<time_str()<<"GPG execution timed out, aborted\n";
}
DeleteFile(path_out.c_str());
@@ -893,6 +898,7 @@ static JABBER_HANDLER_FUNC PrescenseHandler(IJabberInterface *ji, HXML node, voi
if(!gpg_thread.timed_join(boost::posix_time::seconds(15)))
{
gpg_thread.~thread();
+ TerminateProcess(params.hProcess, 1);
debuglog<<time_str()<<": GPG execution timed out, aborted\n";
// sign_file_mutex.unlock();
return FALSE;