From 8f9f3224aac78ce9d54e19e73acf7ab659787168 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 5 Jun 2019 15:48:33 +0200 Subject: core: Improve the debug messages even more. * src/debug.c (_gpgme_debug): Add arg LINE. Chnage all callers. (_gpgme_debug_begin): Remove. * src/debug.h (TRACE_SEQ): Use the LINE arg of _gpgme_debug. -- This includes chnages to always print fds in decimal as weel as tweaking the TARCE_SEQ function to make use of the new machinery. The standard 'tag' can now always be NULL and no tag information will be printed. Signed-off-by: Werner Koch --- src/w32-util.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/w32-util.c') diff --git a/src/w32-util.c b/src/w32-util.c index fba43448..82076762 100644 --- a/src/w32-util.c +++ b/src/w32-util.c @@ -262,19 +262,19 @@ _gpgme_allow_set_foreground_window (pid_t pid) if (!pid || pid == (pid_t)(-1)) { - TRACE (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", 0, + TRACE (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", NULL, "no action for pid %d", (int)pid); } else if (func) { int rc = func (pid); - TRACE (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", 0, + TRACE (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", NULL, "called for pid %d; result=%d", (int)pid, rc); } else { - TRACE (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", 0, + TRACE (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", NULL, "function not available"); } #endif /* HAVE_ALLOW_SET_FOREGROUND_WINDOW */ @@ -310,13 +310,13 @@ _gpgme_w32_cancel_synchronous_io (HANDLE thread) { if (!func (thread) && GetLastError() != ERROR_NOT_FOUND) { - TRACE (DEBUG_ENGINE, "gpgme:CancelSynchronousIo", 0, + TRACE (DEBUG_ENGINE, "gpgme:CancelSynchronousIo", NULL, "called for thread %p: ec=%d", thread, GetLastError ()); } } else { - TRACE (DEBUG_ENGINE, "gpgme:CancelSynchronousIo", 0, + TRACE (DEBUG_ENGINE, "gpgme:CancelSynchronousIo", NULL, "function not available"); } } @@ -578,7 +578,7 @@ _gpgme_get_gpg_path (void) /* 4. Print a debug message if not found. */ if (!gpg) - _gpgme_debug (DEBUG_ENGINE, -1, NULL, NULL, NULL, + _gpgme_debug (NULL, DEBUG_ENGINE, -1, NULL, NULL, NULL, "_gpgme_get_gpg_path: '%s' not found", name); return gpg; @@ -654,7 +654,7 @@ _gpgme_get_gpgconf_path (void) /* 5. Print a debug message if not found. */ if (!gpgconf) - _gpgme_debug (DEBUG_ENGINE, -1, NULL, NULL, NULL, + _gpgme_debug (NULL, DEBUG_ENGINE, -1, NULL, NULL, NULL, "_gpgme_get_gpgconf_path: '%s' not found",name); return gpgconf; -- cgit v1.2.3