diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2011-03-30 09:36:35 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2011-03-30 09:36:35 +0300 |
commit | 903cf85316f641a2d7fcc7fb87ed75889469d2dc (patch) | |
tree | 1f4f91e20a7798d29b648daf43a194d368c98aa7 /options.cpp | |
parent | 8174eb73282e177112615c2dd332b69401959764 (diff) |
some agression )
Diffstat (limited to 'options.cpp')
-rw-r--r-- | options.cpp | 7 |
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, ¶ms));
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;
}
|