[MINOR] config: don't report error on all subsequent files on failure

Cyril Bont found that when an error is detected in one config file, it
is also reported in all other ones, which is wrong. The fix obviously
consists in checking the return code from readcfgfile() and not the
accumulator.
(cherry picked from commit 25a67fae3e)
This commit is contained in:
Willy Tarreau 2009-12-15 21:46:25 +01:00
parent 97c8d9e1a5
commit e3a93ff814
1 changed files with 2 additions and 2 deletions

View File

@ -551,9 +551,9 @@ void init(int argc, char **argv)
cfg_cfgfile[i], strerror(errno)); cfg_cfgfile[i], strerror(errno));
exit(1); exit(1);
} }
err_code |= ret; if (ret & (ERR_ABORT|ERR_FATAL))
if (err_code & (ERR_ABORT|ERR_FATAL))
Alert("Error(s) found in configuration file : %s\n", cfg_cfgfile[i]); Alert("Error(s) found in configuration file : %s\n", cfg_cfgfile[i]);
err_code |= ret;
if (err_code & ERR_ABORT) if (err_code & ERR_ABORT)
exit(1); exit(1);
} }