diff options
author | Werner Koch <[email protected]> | 2018-05-09 14:39:30 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2018-05-09 14:39:30 +0000 |
commit | e2a8a87bf9cfae5d4e8a5953c2a5303b44feb398 (patch) | |
tree | f1fb395b58029853dcc6f77ae05e6605cc5df91e | |
parent | python: key expiration datetime stamp tests (diff) | |
download | gpgme-e2a8a87bf9cfae5d4e8a5953c2a5303b44feb398.tar.gz gpgme-e2a8a87bf9cfae5d4e8a5953c2a5303b44feb398.zip |
core: Make the status-fd monitor work for all gpgsm commands.
* src/engine-gpgsm.c (status_handler): Call the status monitor also
here.
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | src/engine-gpgsm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c index da7e524f..7b221831 100644 --- a/src/engine-gpgsm.c +++ b/src/engine-gpgsm.c @@ -1013,8 +1013,17 @@ status_handler (void *opaque, int fd) *(rest++) = 0; r = _gpgme_parse_status (line + 2); + if (gpgsm->status.mon_cb && r != GPGME_STATUS_PROGRESS) + { + /* Note that we call the monitor even if we do + * not know the status code (r < 0). */ + err = gpgsm->status.mon_cb (gpgsm->status.mon_cb_value, + line + 2, rest); + } + else + err = 0; - if (r >= 0) + if (r >= 0 && !err) { if (gpgsm->status.fnc) { |