]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: server: split srv_init() in srv_preinit() + srv_postinit()
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 8 Aug 2025 10:22:13 +0000 (12:22 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Wed, 27 Aug 2025 10:54:19 +0000 (12:54 +0200)
commitcdb97cb73e6c6c5773674e4809c86b731c00d431
treecf7f8776a6a997fbcdb0a8d88c8047f2d2a35f5c
parent9736221e90e51e9fd63e04f9ac638cf777071791
MEDIUM: server: split srv_init() in srv_preinit() + srv_postinit()

We actually need more granularity to split srv postparsing init tasks:
Some of them are required to be run BEFORE the config is checked, and
some of them AFTER the config is checked.

Thus we push the logic from 368d0136 ("MEDIUM: server: add and use
srv_init() function") a little bit further and split the function
in two distinct ones, one of them executed under check_config_validity()
and the other one using REGISTER_POST_SERVER_CHECK() hook.

SRV_F_CHECKED flag was removed because it is no longer needed,
srv_preinit() is only called once, and so is srv_postinit().
include/haproxy/server-t.h
include/haproxy/server.h
src/cfgparse.c
src/server.c