aboutsummaryrefslogtreecommitdiffstats
path: root/src/import.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-03-09 10:45:00 +0000
committerWerner Koch <[email protected]>2017-03-09 10:45:00 +0000
commitd2240a2a1819874929bdab820bcbd3bee7f94407 (patch)
tree1aecda9baf3d01f13f20433b6ccbc418c8500d5b /src/import.c
parentpython: Print path of the Python module used during tests. (diff)
downloadgpgme-d2240a2a1819874929bdab820bcbd3bee7f94407.tar.gz
gpgme-d2240a2a1819874929bdab820bcbd3bee7f94407.zip
core: Fix status error return for gpgsm.
* src/engine-gpgsm.c (gpgsm_assuan_simple_command): Make sure CB_ERR is returned. * src/import.c (parse_import_res): Do not return an error for the last field. (import_status_handler): Actually return the error from parse_import_res. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/import.c')
-rw-r--r--src/import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/import.c b/src/import.c
index 6233a155..4173fe91 100644
--- a/src/import.c
+++ b/src/import.c
@@ -193,7 +193,7 @@ parse_import_res (char *args, gpgme_import_result_t result)
#define PARSE_NEXT(x) \
(x) = strtol (args, &tail, 0); \
- if (errno || args == tail || *tail != ' ') \
+ if (errno || args == tail || !(*tail == ' ' || !*tail)) \
/* The crypto backend does not behave. */ \
return trace_gpg_error (GPG_ERR_INV_ENGINE); \
args = tail;
@@ -249,7 +249,7 @@ import_status_handler (void *priv, gpgme_status_code_t code, char *args)
default:
break;
}
- return 0;
+ return err;
}