From: Miroslav Zagorac Date: Tue, 8 Mar 2022 00:21:04 +0000 (+0100) Subject: DEBUG: opentracing: display the contents of the err variable after setting X-Git-Tag: v2.6-dev5~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a1dfdde67f703e0de575cf99f4c31fffe1ff780;p=thirdparty%2Fhaproxy.git 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. This patch must be backported as far as 2.4. --- diff --git a/addons/ot/include/define.h b/addons/ot/include/define.h index d34f6b9f28..3c3e4a3e08 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 { \