[git] GPGME - branch, master, updated. gpgme-1.6.0-11-g67d7f7a

by Daiki Ueno cvs at cvs.gnupg.org
Fri Dec 4 16:41:29 CET 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 "GnuPG Made Easy".

The branch, master has been updated
       via  67d7f7a9383763b01daf877c846bf3e32f647fa5 (commit)
      from  3b6e9a3d0afcdd3c2f1de19f15924c3404c7140a (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 67d7f7a9383763b01daf877c846bf3e32f647fa5
Author: Daiki Ueno <ueno at gnu.org>
Date:   Mon Nov 9 13:13:50 2015 +0900

    Return on user cancellation of delete operation
    
    * src/delete.c (delete_status_handler): Return on ERROR status, if the
    error location is set to "delete_key.secret" and the code is either
    CANCELED or FULLY_CANCELED, which indicates a situation that the user
    selected "No" on the confirmation dialog.

diff --git a/src/delete.c b/src/delete.c
index 37e54f8..d20a5bf 100644
--- a/src/delete.c
+++ b/src/delete.c
@@ -68,6 +68,38 @@ delete_status_handler (void *priv, gpgme_status_code_t code, char *args)
 	  return gpg_error (GPG_ERR_GENERAL);
 	}
     }
+  else if (code == GPGME_STATUS_ERROR)
+    {
+      /* Some error stati are informational, so we don't return an
+         error code if we are not ready to process this status.  */
+      gpgme_error_t err;
+      char *where = strchr (args, ' ');
+      char *which;
+
+      if (where)
+	{
+	  *where = '\0';
+	  which = where + 1;
+
+	  where = strchr (which, ' ');
+	  if (where)
+	    *where = '\0';
+
+	  where = args;
+	}
+      else
+	return trace_gpg_error (GPG_ERR_INV_ENGINE);
+
+      err = atoi (which);
+
+      if (!strcmp (where, "delete_key.secret")
+	  && (gpg_err_code (err) == GPG_ERR_CANCELED
+	      || gpg_err_code (err) == GPG_ERR_FULLY_CANCELED))
+	{
+	  /* This indicates a user cancellation on the confirmation dialog.  */
+	  return gpg_error (gpg_err_code (err));
+	}
+    }
   return 0;
 }
 

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

Summary of changes:
 src/delete.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list