From: Amaury Denoyelle Date: Mon, 29 Mar 2021 08:41:15 +0000 (+0200) Subject: MINOR: cfgparse: diag for multiple nbthread statements X-Git-Tag: v2.4-dev15~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4d47d609aa036a87efe11742ee463d986e7c9ab;p=thirdparty%2Fhaproxy.git MINOR: cfgparse: diag for multiple nbthread statements Output a diagnostic report if the nbthread statement is defined on several places in the configuration. --- diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index 72b11c0330..e0762478bb 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",