aboutsummaryrefslogtreecommitdiffstats
path: root/src/sign.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2012-10-19 09:23:39 +0000
committerWerner Koch <[email protected]>2012-10-19 09:23:39 +0000
commitbd24feaa86f8154e550107990392ac9ac05e60d4 (patch)
tree6774aa2c1148896839045d2f34e753d0def5d050 /src/sign.c
parentAvoid warning about initialized but not used variable (diff)
downloadgpgme-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/sign.c')
-rw-r--r--src/sign.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sign.c b/src/sign.c
index 15092049..67280e9f 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -169,14 +169,14 @@ parse_sig_created (char *args, gpgme_new_signature_t *sigp)
default:
/* The backend engine is not behaving. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
args++;
if (*args != ' ')
{
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
gpg_err_set_errno (0);
@@ -185,7 +185,7 @@ parse_sig_created (char *args, gpgme_new_signature_t *sigp)
{
/* The crypto backend does not behave. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
args = tail;
@@ -194,7 +194,7 @@ parse_sig_created (char *args, gpgme_new_signature_t *sigp)
{
/* The crypto backend does not behave. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
args = tail;
@@ -205,7 +205,7 @@ parse_sig_created (char *args, gpgme_new_signature_t *sigp)
{
/* The crypto backend does not behave. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
args = tail;
@@ -214,7 +214,7 @@ parse_sig_created (char *args, gpgme_new_signature_t *sigp)
{
/* The crypto backend does not behave. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
args = tail;
while (*args == ' ')
@@ -224,7 +224,7 @@ parse_sig_created (char *args, gpgme_new_signature_t *sigp)
{
/* The crypto backend does not behave. */
free (sig);
- return gpg_error (GPG_ERR_INV_ENGINE);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
}
tail = strchr (args, ' ');