A display of the contents of the err variable has been added to the
FLT_OT_ERR() macro, once it has been set.

--
Miroslav Zagorac
Senior Developer
>From e38e00f8eb67010cd607429ece16d39c4b9e0f73 Mon Sep 17 00:00:00 2001
From: Miroslav Zagorac <mzago...@haproxy.com>
Date: Tue, 8 Mar 2022 01:21:04 +0100
Subject: [PATCH 12/16] DEBUG: opentracing: display the contents of the err
 variable after setting

A display of the contents of the err variable has been added to the
FLT_OT_ERR() macro, once it has been set.
---
 addons/ot/include/define.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/addons/ot/include/define.h b/addons/ot/include/define.h
index d34f6b9f2..3c3e4a3e0 100644
--- a/addons/ot/include/define.h
+++ b/addons/ot/include/define.h
@@ -73,10 +73,13 @@
 	char                       *p = b[__idx]; \
 	__idx = (__idx + 1) % (m)
 
-#define FLT_OT_ERR(f, ...)                                      \
-	do {                                                    \
-		if ((err != NULL) && (*err == NULL))            \
-			(void)memprintf(err, f, ##__VA_ARGS__); \
+#define FLT_OT_ERR(f, ...)                                             \
+	do {                                                           \
+		if ((err != NULL) && (*err == NULL)) {                 \
+			(void)memprintf(err, f, ##__VA_ARGS__);        \
+                                                                       \
+			FLT_OT_DBG(3, "%d err: '%s'", __LINE__, *err); \
+		}                                                      \
 	} while (0)
 #define FLT_OT_ERR_APPEND(f, ...)                               \
 	do {                                                    \
-- 
2.30.2

Reply via email to