Blame SOURCES/0001-core-Tweak-STATUS_FAILURE-handling.patch

888196
From b99502274ae5efdf6df0d967900ec3d1e64373d7 Mon Sep 17 00:00:00 2001
888196
From: Werner Koch <wk@gnupg.org>
888196
Date: Thu, 12 Apr 2018 20:36:30 +0200
888196
Subject: [PATCH] core: Tweak STATUS_FAILURE handling.
888196
888196
* src/op-support.c (_gpgme_parse_failure): Ignore failures with
888196
location "gpg-exit".
888196
* tests/gpg/t-verify.c (main): Adjust for the now working checking of
888196
the second key.
888196
888196
Signed-off-by: Werner Koch <wk@gnupg.org>
888196
---
888196
 src/op-support.c     | 10 +++++++++-
888196
 tests/gpg/t-verify.c |  8 +++++---
888196
 2 files changed, 14 insertions(+), 4 deletions(-)
888196
888196
diff --git a/src/op-support.c b/src/op-support.c
888196
index 43cb1c76..e55875f9 100644
888196
--- a/src/op-support.c
888196
+++ b/src/op-support.c
888196
@@ -400,7 +400,13 @@ _gpgme_parse_plaintext (char *args, char **filenamep)
888196
 
888196
 
888196
 /* Parse a FAILURE status line and return the error code.  ARGS is
888196
-   modified to contain the location part.  */
888196
+ * modified to contain the location part.  Note that for now we ignore
888196
+ * failure codes with a location of gpg-exit; they are too trouble
888196
+ * some.  Instead we should eventually record that error in the
888196
+ * context and provide a function to return a fuller error
888196
+ * description; this could then also show the location of the error
888196
+ * (e.g. "option- parser") to make it easier for the user to detect
888196
+ * the actual error. */
888196
 gpgme_error_t
888196
 _gpgme_parse_failure (char *args)
888196
 {
888196
@@ -418,6 +424,8 @@ _gpgme_parse_failure (char *args)
888196
     *where = '\0';
888196
 
888196
   where = args;
888196
+  if (!strcmp (where, "gpg-exit"))
888196
+    return 0;
888196
 
888196
   return atoi (which);
888196
 }
888196
-- 
888196
2.14.3
888196