]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: config: detect double registration of a config section
authorWilly Tarreau <w@1wt.eu>
Tue, 17 May 2016 14:16:09 +0000 (16:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 May 2016 14:18:31 +0000 (16:18 +0200)
commit5e4261b0e469d176e075b41778b07df83f5c7c77
tree027c36ef262d472ef658332222a5008777e180e0
parent379d9c7c14e684ab1dcdb6467a6bf189153c2b1d
CLEANUP: config: detect double registration of a config section

In an effort to make the config parser more robust, we should validate
that everything we register is not already registered. Most cfg_register_*
functions unfortunately return void and just perform a LIST_ADDQ(), so they
will have to change for this. At least cfg_register_section() does perform
a bit of checks and is easy to check for such errors, so let's start with
this one. Future patches will definitely have to focus on the remaining
functions and ensure unicity of all config parsers.
src/cfgparse.c