diff options
author | Werner Koch <[email protected]> | 2012-10-19 09:23:39 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2012-10-19 09:23:39 +0000 |
commit | bd24feaa86f8154e550107990392ac9ac05e60d4 (patch) | |
tree | 6774aa2c1148896839045d2f34e753d0def5d050 /src/decrypt.c | |
parent | Avoid warning about initialized but not used variable (diff) | |
download | gpgme-bd24feaa86f8154e550107990392ac9ac05e60d4.tar.gz gpgme-bd24feaa86f8154e550107990392ac9ac05e60d4.zip |
Trace the use of GPG_ERR_INV_ENGINE.
* src/debug.h: Include "gpgme.h"
(_gpgme_trace_gpgme_error): New.
(trace_gpg_error): New macro. Use it in all files where we return
GPG_ERR_INV_ENGINE; also "include debug.h" as needed.
--
This is a pretty common error code but often it is hard to figure out
the actual cause. With debug level 4 we now print the file name and
line number where this error code is generated by gpgme. Along with
the git revision printed in the first log lines, this should give us
an easier way to track down the problems related to this error code.
Diffstat (limited to 'src/decrypt.c')
-rw-r--r-- | src/decrypt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decrypt.c b/src/decrypt.c index f4f95dc9..63787c70 100644 --- a/src/decrypt.c +++ b/src/decrypt.c @@ -146,7 +146,7 @@ parse_enc_to (char *args, gpgme_recipient_t *recp) if (*args != '\0' && *args != ' ') { free (rec); - return gpg_error (GPG_ERR_INV_ENGINE); + return trace_gpg_error (GPG_ERR_INV_ENGINE); } while (*args == ' ') @@ -160,7 +160,7 @@ parse_enc_to (char *args, gpgme_recipient_t *recp) { /* The crypto backend does not behave. */ free (rec); - return gpg_error (GPG_ERR_INV_ENGINE); + return trace_gpg_error (GPG_ERR_INV_ENGINE); } } @@ -283,7 +283,7 @@ _gpgme_decrypt_status_handler (void *priv, gpgme_status_code_t code, } /* FIXME: Is this ok? */ if (!rec) - return gpg_error (GPG_ERR_INV_ENGINE); + return trace_gpg_error (GPG_ERR_INV_ENGINE); } break; |