summaryrefslogtreecommitdiff
path: root/options.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2011-04-01 02:24:07 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2011-04-01 02:24:07 +0300
commita7823b56a5b08f81248e83804349bc8e9fc61206 (patch)
tree9d2e3a7a558498be03513c96c35796b948418115 /options.cpp
parentb0e1bb306eec7f2d13ff385d4c1191646cc3e7f9 (diff)
parent8cdda41b119526a2741938d57b7e066e1697315b (diff)
Merge branch 'new_gpg' into new_gpg_autoexchange
Conflicts: messages.cpp
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;
}