MINOR: cfgparse: diag for multiple nbthread statements

Output a diagnostic report if the nbthread statement is defined on
several places in the configuration.
This commit is contained in:
Amaury Denoyelle 2021-03-29 10:41:15 +02:00
parent 7b01a8dbdd
commit c4d47d609a

View File

@ -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",