2008-12-10 [colin] 3.6.1cvs68
authorColin Leroy <colin@colino.net>
Wed, 10 Dec 2008 22:20:52 +0000 (22:20 +0000)
committerColin Leroy <colin@colino.net>
Wed, 10 Dec 2008 22:20:52 +0000 (22:20 +0000)
* 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.

ChangeLog
PATCHSETS
configure.ac
src/plugins/pgpcore/pgp_viewer.c

index d9f18b22f08be06ca794dc8a722e573d6c331ce3..2c6c78427501d8d2fdc0289ea09925e8e32b550f 100644 (file)
--- 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
index 9f67f6ec48e6707ce7da0962f8831e324a629600..bf0053240e43cf035e52f03602ad8e8430c574e6 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index 68cddc1da18585d59e8ca59a2ea1c0992c2b589a..fabd7ff00971e20b168b52ee8e02810f299bc561 100644 (file)
@@ -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=
 
index a2ed2c9c5193610424dcd7e9519ef7ede24ab16a..9563022df4498e742f37362cfe1049d3a1a2b174 100644 (file)
@@ -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);
                        }