MINOR: cfgparse/server: move (min/max)conn postparsing logic into dedicated function
In check_config_validity() function, we performed some consistency checks to
adjust minconn/maxconn attributes for each declared server.
We move this logic into a dedicated function named srv_minmax_conn_apply()
to be able to perform those checks later in the process life when needed
(ie: dynamic servers)
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 52b3086..60d007b 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -3818,16 +3818,7 @@
while (newsrv != NULL) {
set_usermsgs_ctx(newsrv->conf.file, newsrv->conf.line, &newsrv->obj_type);
- if (newsrv->minconn > newsrv->maxconn) {
- /* Only 'minconn' was specified, or it was higher than or equal
- * to 'maxconn'. Let's turn this into maxconn and clean it, as
- * this will avoid further useless expensive computations.
- */
- newsrv->maxconn = newsrv->minconn;
- } else if (newsrv->maxconn && !newsrv->minconn) {
- /* minconn was not specified, so we set it to maxconn */
- newsrv->minconn = newsrv->maxconn;
- }
+ srv_minmax_conn_apply(newsrv);
/* this will also properly set the transport layer for
* prod and checks