talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit b1fb71d4e22dcbaf33047baf8036a7e92842954f
parent 4f00a803a94b87f6a6ba147b6b0be77fa24e2af7
Author: Colin Leroy <colin@colino.net>
Date:   Wed, 10 Dec 2008 22:20:52 +0000

2008-12-10 [colin]	3.6.1cvs68

	* src/plugins/pgpcore/pgp_viewer.c
		Fix bug 1736, 'Key import does not work'
		Kill the correct pid (and not the parent
		shell), and increase the timeout a bit.

Diffstat:
MChangeLog | 7+++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/plugins/pgpcore/pgp_viewer.c | 19++++++++++++-------
4 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-10 [colin] 3.6.1cvs68 + + * src/plugins/pgpcore/pgp_viewer.c + Fix bug 1736, 'Key import does not work' + Kill the correct pid (and not the parent + shell), and increase the timeout a bit. + 2008-12-09 [paul] 3.6.1cvs67 * src/messageview.c diff --git a/PATCHSETS b/PATCHSETS @@ -3649,3 +3649,4 @@ ( cvs diff -u -r 1.94.2.192 -r 1.94.2.193 src/messageview.c; ) > 3.6.1cvs65.patchset ( cvs diff -u -r 1.382.2.488 -r 1.382.2.489 src/compose.c; cvs diff -u -r 1.50.2.51 -r 1.50.2.52 src/compose.h; cvs diff -u -r 1.2.2.19 -r 1.2.2.20 src/folder_item_prefs.h; cvs diff -u -r 1.204.2.183 -r 1.204.2.184 src/prefs_common.c; cvs diff -u -r 1.103.2.119 -r 1.103.2.120 src/prefs_common.h; cvs diff -u -r 1.9.2.46 -r 1.9.2.47 src/common/defs.h; ) > 3.6.1cvs66.patchset ( cvs diff -u -r 1.94.2.193 -r 1.94.2.194 src/messageview.c; ) > 3.6.1cvs67.patchset +( cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/plugins/pgpcore/pgp_viewer.c; ) > 3.6.1cvs68.patchset diff --git a/configure.ac b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=6 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=67 +EXTRA_VERSION=68 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/plugins/pgpcore/pgp_viewer.c b/src/plugins/pgpcore/pgp_viewer.c @@ -144,6 +144,7 @@ static void pgpview_show_mime_part(TextView *textview, MimeInfo *partinfo) TEXTVIEW_INSERT(":\n\n"); main_window_cursor_wait(mainwindow_get_mainwindow()); + textview_cursor_wait(textview); GTK_EVENTS_FLUSH(); pid = fork(); @@ -151,9 +152,10 @@ static void pgpview_show_mime_part(TextView *textview, MimeInfo *partinfo) res = -1; } else if (pid == 0) { /* son */ - res = system(cmd); - res = WEXITSTATUS(res); - _exit(res); + gchar **argv; + argv = strsplit_with_quote(cmd, " ", 0); + res = execvp(argv[0], argv); + exit(255); } else { int status = 0; time_t start_wait = time(NULL); @@ -165,22 +167,25 @@ static void pgpview_show_mime_part(TextView *textview, MimeInfo *partinfo) res = WEXITSTATUS(status); break; } - if (time(NULL) - start_wait > 5) { - debug_print("SIGTERM'ing gpg\n"); + if (time(NULL) - start_wait > 9) { + debug_print("SIGTERM'ing gpg %d\n", pid); kill(pid, SIGTERM); } - if (time(NULL) - start_wait > 6) { - debug_print("SIGKILL'ing gpg\n"); + if (time(NULL) - start_wait > 10) { + debug_print("SIGKILL'ing gpg %d\n", pid); kill(pid, SIGKILL); break; } } while(1); } main_window_cursor_normal(mainwindow_get_mainwindow()); + textview_cursor_normal(textview); + debug_print("res %d\n", res); if (res == 0) { TEXTVIEW_INSERT(_(" This key has been imported to your keyring.\n")); } else { TEXTVIEW_INSERT(_(" This key couldn't be imported to your keyring.\n")); + TEXTVIEW_INSERT(_(" Key servers are sometimes slow.\n")); TEXTVIEW_INSERT(_(" You can try to import it manually with the command:\n\n ")); TEXTVIEW_INSERT(cmd); }