]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: initcall: allow to register mutiple post_section_parser per section
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 10 Feb 2025 14:07:05 +0000 (15:07 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 12 Feb 2025 11:52:41 +0000 (12:52 +0100)
commit4de86bbbfc228f0c7e5b8ee31b76ab17a04b2060
tree17a3f9193f868e62f6b2c78353604a15e22abe0a
parent5c2039b5b8fecfd3019be35e4ae7b549ead895ee
MEDIUM: initcall: allow to register mutiple post_section_parser per section

Before this patch, REGISTER_CONFIG_SECTION() allowed to register one and only
one callback (<post>) called after the parsing of a section.

It was limitating because you couldn't register a post callback from anywhere
else in the code.

This patch introduces the new REGISTER_CONFIG_SECTION_POST() macros which allows
to register a new post callback for a section keyword from anywhere.

This patch introduces the feature by allowing `struct cfg_section` entries that
does not have a `section_parser`, and then iterating on all cfg_section with a
post_section_parser for a keyword.
doc/internals/api/initcalls.txt
include/haproxy/cfgparse.h
src/cfgparse.c