diff options
author | Werner Koch <[email protected]> | 2017-03-09 10:45:00 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-03-09 10:45:00 +0000 |
commit | d2240a2a1819874929bdab820bcbd3bee7f94407 (patch) | |
tree | 1aecda9baf3d01f13f20433b6ccbc418c8500d5b /src/import.c | |
parent | python: Print path of the Python module used during tests. (diff) | |
download | gpgme-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.c | 4 |
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; } |