From c4d47d609aa036a87efe11742ee463d986e7c9ab Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Mon, 29 Mar 2021 10:41:15 +0200 Subject: [PATCH] MINOR: cfgparse: diag for multiple nbthread statements Output a diagnostic report if the nbthread statement is defined on several places in the configuration. --- src/cfgparse-global.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index 72b11c033..e0762478b 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -579,6 +579,11 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) err_code |= ERR_ALERT | ERR_FATAL; goto out; } + + HA_DIAG_WARNING_COND(global.nbthread, + "parsing [%s:%d] : nbthread is already defined and will be overridden.\n", + file, linenum); + global.nbthread = parse_nbthread(args[1], &errmsg); if (!global.nbthread) { ha_alert("parsing [%s:%d] : '%s' %s.\n",