summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-04-12 20:36:30 +0200
committerWerner Koch <wk@gnupg.org>2018-04-13 12:05:35 +0200
commit9aa33a99701e189d7fc0ff7322fc9e21e35b73fa (patch)
treeb41417b202ba4e7916f3500ed5948bad5f857860
parent7da01c7352d41eb33e445968b248544d301588f9 (diff)
downloadgpgme-1.10-branch.tar.gz
core: Tweak STATUS_FAILURE handling.gpgme-1.10-branch
* src/op-support.c (_gpgme_parse_failure): Ignore failures with location "gpg-exit". -- Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r--src/op-support.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/op-support.c b/src/op-support.c
index 817c5691..8269ce21 100644
--- a/src/op-support.c
+++ b/src/op-support.c
@@ -398,7 +398,13 @@ _gpgme_parse_plaintext (char *args, char **filenamep)
/* Parse a FAILURE status line and return the error code. ARGS is
- modified to contain the location part. */
+ * modified to contain the location part. Note that for now we ignore
+ * failure codes with a location of gpg-exit; they are too trouble
+ * some. Instead we should eventually record that error in the
+ * context and provide a function to return a fuller error
+ * description; this could then also show the location of the error
+ * (e.g. "option- parser") to make it easier for the user to detect
+ * the actual error. */
gpgme_error_t
_gpgme_parse_failure (char *args)
{
@@ -416,6 +422,8 @@ _gpgme_parse_failure (char *args)
*where = '\0';
where = args;
+ if (!strcmp (where, "gpg-exit"))
+ return 0;
return atoi (which);
}