Move server linked into proxy backend list outside of _srv_parse_init to
parse_server.
This is groundwork for dynamic servers support. There will be two
differences in case of a dynamic server :
- the server will be attached to the proxy list only at the very end of the
operations when everything is ok
- the server will be directly attached to the end of the server proxy
list
newsrv->tmpl_info.nb_high = tmpl_range_high;
}
- /* the servers are linked backwards first */
- newsrv->next = curproxy->srv;
- curproxy->srv = newsrv;
/* Note: for a server template, its id is its prefix.
* This is a temporary id which will be used for server allocations to come
* after parsing.
free(errmsg);
}
+ /* the servers are linked backwards first */
+ if (newsrv && !defsrv) {
+ newsrv->next = curproxy->srv;
+ curproxy->srv = newsrv;
+ }
+
if (err_code & ERR_CODE)
goto out;
if (srv_tmpl)
_srv_parse_tmpl_init(newsrv, curproxy);
}
+
return 0;
out: