mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUG/MINOR: mworker: post_section_parser for the last section in discovery
Previous patch 2c270a05f
("BUG/MINOR: mworker: section ignored in
discovery after a post_section_parser") needs an adjustment for the last
section of the file.
Indeed the post_section_parser of the last section must not be called in
discovery mode.
Must be backported in 3.1.
This commit is contained in:
parent
2c270a05f0
commit
313eeae7db
@ -2623,8 +2623,13 @@ int parse_cfg(const struct cfgfile *cfg)
|
||||
}
|
||||
|
||||
ha_free(&global.cfg_curr_section);
|
||||
if (cs && cs->post_section_parser)
|
||||
err_code |= cs->post_section_parser();
|
||||
|
||||
/* call post_section_parser of the last section when there is no more lines */
|
||||
if (cs && cs->post_section_parser) {
|
||||
/* don't call post_section_parser in MODE_DISCOVERY */
|
||||
if (!(global.mode & MODE_DISCOVERY))
|
||||
err_code |= cs->post_section_parser();
|
||||
}
|
||||
|
||||
if (nested_cond_lvl) {
|
||||
ha_alert("parsing [%s:%d]: non-terminated '.if' block.\n", file, linenum);
|
||||
|
Loading…
Reference in New Issue
Block a user