aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-06-26 10:06:31 +0000
committerWerner Koch <[email protected]>2015-06-26 10:06:31 +0000
commitcd8face27cc96cb0092c920e6e5bdee81a61c420 (patch)
tree2b7470d9361ae2fb2089bb6172a564678bfc3626
parentDo not segv if NULL is passed for CTX in sendfd and receivefd. (diff)
downloadlibassuan-cd8face27cc96cb0092c920e6e5bdee81a61c420.tar.gz
libassuan-cd8face27cc96cb0092c920e6e5bdee81a61c420.zip
Return GPG_ERR_SOURCE_ASSUAN on errors with no CTX.
* src/assuan-defs.h (_assuan_error): Use error source Assuan if no CTX is given. Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--src/assuan-defs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/assuan-defs.h b/src/assuan-defs.h
index 3dec3df..68cd810 100644
--- a/src/assuan-defs.h
+++ b/src/assuan-defs.h
@@ -228,7 +228,7 @@ struct assuan_context_s
static GPG_ERR_INLINE gpg_error_t
_assuan_error (assuan_context_t ctx, gpg_err_code_t errcode)
{
- return gpg_err_make (ctx?ctx->err_source:0, errcode);
+ return gpg_err_make (ctx?ctx->err_source: GPG_ERR_SOURCE_ASSUAN, errcode);
}
/* Release all resources associated with an engine operation. */