diff options
author | Werner Koch <[email protected]> | 2019-06-05 14:37:59 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-06-05 14:48:47 +0000 |
commit | 0f68c9f16bdae7295cac4cbf3c9a197840989a85 (patch) | |
tree | 5ff057b5a1f052f1d749b1c2ff6defef6ff9ce75 /src/debug.h | |
parent | tests: Use synced output for error in run-threaded (diff) | |
download | gpgme-0f68c9f16bdae7295cac4cbf3c9a197840989a85.tar.gz gpgme-0f68c9f16bdae7295cac4cbf3c9a197840989a85.zip |
core: Prettify _gpgme_io_select debug output again and fix TRACE_SYSRES.
* src/debug.c (_gpgme_debug): Take better care of NULL userinfo.
(_gpgme_debug_end): Rework.
(_trace_sysres): Print ERRNO and not the supplied RES.
--
The TRACE_SYSRES patch fixes
Regression-due-to: 7a1e7006d06fdbab86ea79a197c316744b09d933
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/debug.h')
-rw-r--r-- | src/debug.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/debug.h b/src/debug.h index 08d063c6..fa0bfc6c 100644 --- a/src/debug.h +++ b/src/debug.h @@ -25,6 +25,7 @@ #ifdef HAVE_STDINT_H #include <stdint.h> #endif +#include <errno.h> #include "gpgme.h" /* Required for gpgme_error stuff. */ @@ -151,7 +152,7 @@ _trace_sysres (int res, int lvl, const char *func, int line) else _gpgme_debug (NULL, lvl, -1, NULL, NULL, NULL, "%s:%d: error: %s (%d)\n", - func, line, strerror (res), res); + func, line, strerror (errno), errno); _gpgme_debug_frame_end (); return res; } |