]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: trace/config: do not register section "traces" with USE_TRACE=0
authorWilly Tarreau <w@1wt.eu>
Wed, 1 Jul 2026 13:38:34 +0000 (15:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Jul 2026 14:32:28 +0000 (16:32 +0200)
We don't want to register the "traces" section when traces are disabled.
Also this forces us to continue to build trace.c.

src/cfgparse.c

index d1cb5af6f63ee7e2e1739ad98992fece8ea08f10..6d528dd4882dad8d55c2e85a9551fd536c2bd988 100644 (file)
@@ -3184,7 +3184,9 @@ REGISTER_CONFIG_SECTION("global",         cfg_parse_global,    NULL);
 REGISTER_CONFIG_SECTION("userlist",       cfg_parse_users,     NULL);
 REGISTER_CONFIG_SECTION("mailers",        cfg_parse_mailers,   NULL);
 REGISTER_CONFIG_SECTION("namespace_list", cfg_parse_netns,     NULL);
+#if defined(USE_TRACE)
 REGISTER_CONFIG_SECTION("traces",         cfg_parse_traces,    NULL);
+#endif
 
 static struct cfg_kw_list cfg_kws = {{ },{
        { CFG_GLOBAL, "default-path",     cfg_parse_global_def_path },