From 0b340101607ce70c8340532abf63da8bef4112e1 Mon Sep 17 00:00:00 2001 From: Balazs Scheidler Date: Sat, 5 Oct 2024 14:06:22 +0200 Subject: [PATCH] messages: capture errno in debug & trace messages as well So far if we were to use evt_tag_error() in debug or trace messages we got a compilation error. Fix that. Signed-off-by: Balazs Scheidler --- lib/messages.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/messages.h b/lib/messages.h index 1a66487242..c05ba67170 100644 --- a/lib/messages.h +++ b/lib/messages.h @@ -102,15 +102,15 @@ void msg_add_option_group(GOptionContext *ctx); #define msg_debug(desc, tags...) \ do { \ if (G_UNLIKELY(debug_flag)) \ - msg_event_suppress_recursions_and_send( \ - msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL )); \ + CAPTURE_ERRNO(msg_event_suppress_recursions_and_send( \ + msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL ))); \ } while (0) #define msg_trace(desc, tags...) \ do { \ if (G_UNLIKELY(trace_flag)) \ - msg_event_suppress_recursions_and_send( \ - msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL )); \ + CAPTURE_ERRNO(msg_event_suppress_recursions_and_send( \ + msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL ))); \ } while (0) #define msg_trace_printf(fmt, values...) \ @@ -122,8 +122,8 @@ void msg_add_option_group(GOptionContext *ctx); #define msg_diagnostics(desc, tags...) \ do { \ if (G_UNLIKELY(trace_flag)) \ - msg_event_print_event_to_stderr( \ - msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL )); \ + CAPTURE_ERRNO(msg_event_print_event_to_stderr( \ + msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL ))); \ } while (0) #define __once() \