[git] Pinentry - branch, master, updated. pinentry-0.9.2-23-g88772dd

by Neal H. Walfield cvs at cvs.gnupg.org
Sat May 16 18:39:40 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The standard pinentry collection".

The branch, master has been updated
       via  88772ddaac96303a63c97a45c26144d93a942798 (commit)
       via  f3cb78985c3c7f96401a06a73412fb704c5efaab (commit)
      from  ae3352566994623d54723283e887bc5f74766e1c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 88772ddaac96303a63c97a45c26144d93a942798
Author: Neal H. Walfield <neal at gnu.org>
Date:   Sat May 16 18:39:14 2015 +0200

    gtk+-2: When the dialog is destroyed, remove any pending timers.
    
    * gtk+-2/pinentry-gtk-2.c (timeout_source): New variable.
    (timeout_cb): Set it to 0.
    (create_window): When setting up the timeout, save the source
    identifier in TIMEOUT_SOURCE.
    (gtk_cmd_handler): If TIMEOUT_SOURCE is not 0, remove the timeout.
    
    --
    Reported-by: Daniel Kahn Gillmorr <dkg at fifthhorseman.net>.

diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c
index 9d29f52..1feecc2 100644
--- a/gtk+-2/pinentry-gtk-2.c
+++ b/gtk+-2/pinentry-gtk-2.c
@@ -75,6 +75,7 @@ static GtkWidget *time_out;
 #endif
 static GtkTooltips *tooltips;
 static gboolean got_input;
+static guint timeout_source;
 
 /* Gnome hig small and large space in pixels.  */
 #define HIG_SMALL      6
@@ -353,6 +354,9 @@ timeout_cb (gpointer data)
   (void)data;
   if (!got_input)
     gtk_main_quit ();
+
+  /* Don't run again.  */
+  timeout_source = 0;
   return FALSE;
 }
 
@@ -687,7 +691,7 @@ create_window (pinentry_t ctx, int confirm_mode)
   gtk_window_present (GTK_WINDOW (win));  /* Make sure it has the focus.  */
 
   if (pinentry->timeout > 0)
-    g_timeout_add (pinentry->timeout*1000, timeout_cb, NULL);
+    timeout_source = g_timeout_add (pinentry->timeout*1000, timeout_cb, NULL);
 
   return win;
 }
@@ -709,6 +713,13 @@ gtk_cmd_handler (pinentry_t pe)
   while (gtk_events_pending ())
     gtk_main_iteration ();
 
+  if (timeout_source)
+    /* There is a timer running.  Cancel it.  */
+    {
+      g_source_remove (timeout_source);
+      timeout_source = 0;
+    }
+
   if (confirm_value == CONFIRM_CANCEL || grab_failed)
     pe->canceled = 1;
 

commit f3cb78985c3c7f96401a06a73412fb704c5efaab
Author: Neal H. Walfield <neal at gnu.org>
Date:   Sat May 16 16:28:19 2015 +0200

    curses: If an error occurs while reading input, cancel the operation.
    
    * pinentry/pinentry-curses.c (dialog_run) [! HAVE_DOSISH_SYSTEM]: If
    an error occurs while reading input, cancel the operation.
    
    Patch-by: Julien Cristau and Daniel Kahn Gillmor.

diff --git a/pinentry/pinentry-curses.c b/pinentry/pinentry-curses.c
index 73eb05f..22e1e23 100644
--- a/pinentry/pinentry-curses.c
+++ b/pinentry/pinentry-curses.c
@@ -863,10 +863,14 @@ dialog_run (pinentry_t pinentry, const char *tty_name, const char *tty_type)
 
       switch (c)
 	{
-#ifndef HAVE_DOSISH_SYSTEM
 	case ERR:
+#ifndef HAVE_DOSISH_SYSTEM
 	  continue;
+#else
+          done = -2;
+          break;
 #endif
+
 	case KEY_LEFT:
 	case KEY_UP:
 	  switch (diag.pos)

-----------------------------------------------------------------------

Summary of changes:
 gtk+-2/pinentry-gtk-2.c    | 13 ++++++++++++-
 pinentry/pinentry-curses.c |  6 +++++-
 2 files changed, 17 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The standard pinentry collection
http://git.gnupg.org




More information about the Gnupg-commits mailing list