Skip to content

Commit a8bc83b

Browse files
committed
MINOR: cfgparse: move proxy post-init in a dedicated function
A lot of proxies initialization code is delayed on post-parsing stage, as it depends on the configuration fully parsed. This is performed via a loop on proxies_list. Extract this code in a dedicated function proxy_finalize(). This patch will be useful for dynamic backends creation. Note that for the moment the code has been extracted as-is. With each new features, some init code was added there. This has become a giant loop with no real ordering. A future patch may provide some cleanup in order to reorganize this.
1 parent 2c8ad11 commit a8bc83b

3 files changed

Lines changed: 1315 additions & 1285 deletions

File tree

include/haproxy/proxy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ int resolve_stick_rule(struct proxy *curproxy, struct sticking_rule *mrule);
9797
void free_stick_rules(struct list *rules);
9898
void free_server_rules(struct list *srules);
9999
int proxy_init_per_thr(struct proxy *px);
100+
int proxy_finalize(struct proxy *px, int *err_code);
100101

101102
/*
102103
* This function returns a string containing the type of the proxy in a format

0 commit comments

Comments
 (0)