diff options
| author | Werner Koch <[email protected]> | 2015-08-24 19:17:21 +0000 | 
|---|---|---|
| committer | Werner Koch <[email protected]> | 2015-08-24 19:17:21 +0000 | 
| commit | ad46f4f655e653580343c15f1b0b365b7d307d1b (patch) | |
| tree | dd8bc0ebb98095e9556ac5df4f2c96b1d674a506 | |
| parent | w32: Look for gpgconf in the new GnuPG 2.1 install dir. (diff) | |
| download | gpgme-ad46f4f655e653580343c15f1b0b365b7d307d1b.tar.gz gpgme-ad46f4f655e653580343c15f1b0b365b7d307d1b.zip | |
Call status_cb for an ERROR status seen in the passphrase handler.
* src/passphrase.c (_gpgme_passphrase_status_handler): Call status_cb.
--
Frankly, we should have a more generic way of feeding the status_cb
handler than our current ad-hoc method.
Signed-off-by: Werner Koch <[email protected]>
| -rw-r--r-- | src/passphrase.c | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/src/passphrase.c b/src/passphrase.c index 63ab31e6..5d656b17 100644 --- a/src/passphrase.c +++ b/src/passphrase.c @@ -116,6 +116,18 @@ _gpgme_passphrase_status_handler (void *priv, gpgme_status_code_t code,  	return gpg_error (GPG_ERR_BAD_PASSPHRASE);        break; +    case GPGME_STATUS_ERROR: +      /* We abuse this status handler to forward ERROR status codes to +         the caller.  This should better be done in a generic handler, +         but for now this is sufficient.  */ +      if (ctx->status_cb) +        { +          err = ctx->status_cb (ctx->status_cb_value, "ERROR", args); +          if (err) +            return err; +        } +      break; +      default:        /* Ignore all other codes.  */        break; | 
