From 5f2274aa1eadcb5da87ff36094d1a3a5a20459aa Mon Sep 17 00:00:00 2001 From: Frederic Lecaille Date: Tue, 21 Apr 2026 08:01:27 +0200 Subject: [PATCH] MINOR: server: export functions used during server initialization Export _srv_parse_kw() and srv_postinit() so they can be called from haload (to come), which needs to configure servers using HAProxy's configuration parser keywords. --- include/haproxy/server.h | 4 ++++ src/server.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/haproxy/server.h b/include/haproxy/server.h index 5ffc06880..84442d3ee 100644 --- a/include/haproxy/server.h +++ b/include/haproxy/server.h @@ -74,6 +74,7 @@ uint server_get_next_id(const struct proxy *px, uint from); void apply_server_state(void); void srv_compute_all_admin_states(struct proxy *px); int srv_set_addr_via_libc(struct server *srv, int *err_code); +int srv_postinit(struct server *srv); int srv_init_addr(void); struct server *cli_find_server(struct appctx *appctx, char *arg); struct server *new_server(struct proxy *proxy); @@ -108,6 +109,9 @@ struct task *srv_cleanup_toremove_conns(struct task *task, void *context, unsign int srv_apply_track(struct server *srv, struct proxy *curproxy); +int _srv_parse_kw(struct server *srv, char **args, int *cur_arg, + struct proxy *curproxy, + int parse_flags); /* * Registers the server keyword list as a list of valid keywords for next * parsing sessions. diff --git a/src/server.c b/src/server.c index 88a05288e..89700eb80 100644 --- a/src/server.c +++ b/src/server.c @@ -3881,7 +3881,7 @@ out: * A mask of errors is returned. ERR_FATAL is set if the parsing should be * interrupted. */ -static int _srv_parse_kw(struct server *srv, char **args, int *cur_arg, +int _srv_parse_kw(struct server *srv, char **args, int *cur_arg, struct proxy *curproxy, int parse_flags) {