summaryrefslogtreecommitdiff
path: root/options.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2011-03-30 09:36:35 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2011-03-30 09:36:35 +0300
commit903cf85316f641a2d7fcc7fb87ed75889469d2dc (patch)
tree1f4f91e20a7798d29b648daf43a194d368c98aa7 /options.cpp
parent8174eb73282e177112615c2dd332b69401959764 (diff)
some agression )
Diffstat (limited to 'options.cpp')
-rw-r--r--options.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/options.cpp b/options.cpp
index f2b658a..04cb56b 100644
--- a/options.cpp
+++ b/options.cpp
@@ -256,6 +256,7 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
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(tmp);
break;
@@ -462,7 +463,10 @@ static BOOL CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
params.result = &result;
boost::thread gpg_thread(boost::bind(&pxEexcute_thread, &params));
if(!gpg_thread.timed_join(boost::posix_time::seconds(10)))
+ {
gpg_thread.~thread();
+ TerminateProcess(params.hProcess, 1);
+ }
DBWriteContactSettingTString(NULL, szGPGModuleName, "szGpgBinPath", tmp_path);
mir_free(tmp_path);
string::size_type p1 = out.find("(GnuPG) ");
@@ -707,6 +711,7 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
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";
}
if((out.find("-----BEGIN PGP PUBLIC KEY BLOCK-----") != string::npos) && (out.find("-----END PGP PUBLIC KEY BLOCK-----") != string::npos))
@@ -858,6 +863,7 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
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";
break;
}
@@ -1093,6 +1099,7 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
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";
break;
}