When servers based on server templates are initialized, the configuration file
and line are now copied. This helps to emit understandable warning and alert
messages.
This patch may be backported if needed, as far as 1.8.
(cherry picked from commit
75bef00538eebc00c22309c7f9391c0f6d502ac0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit
97ae0cf4b20b50fa668e641126c6a65b587359d9)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
if (!newsrv)
goto err;
+ newsrv->conf.file = strdup(srv->conf.file);
+ newsrv->conf.line = srv->conf.line;
+
srv_settings_cpy(newsrv, srv, 1);
srv_prepare_for_resolution(newsrv, srv->hostname);
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME