From 0f68c9f16bdae7295cac4cbf3c9a197840989a85 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 5 Jun 2019 16:37:59 +0200 Subject: 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 --- src/debug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/debug.h') 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 #endif +#include #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; } -- cgit v1.2.3