REORG: server: Export srv_settings_cpy() function
This function will be used to init a proxy with settings of the default
proxy. It is mandatory to fix a bug. To do so, it must be exposed.
(cherry picked from commit b32cb9b5151d4b42ff92edd707d61960f8b3a536)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit b45110ad060b4e980d6485ed686ab9418debad81)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 582688ac13ed14dfd0369005920d73d7c351189d)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/include/haproxy/server.h b/include/haproxy/server.h
index c927de3..d142552 100644
--- a/include/haproxy/server.h
+++ b/include/haproxy/server.h
@@ -45,6 +45,7 @@
int srv_downtime(const struct server *s);
int srv_lastsession(const struct server *s);
int srv_getinter(const struct check *check);
+void srv_settings_cpy(struct server *srv, const struct server *src, int srv_tmpl);
int parse_server(const char *file, int linenum, char **args, struct proxy *curproxy, const struct proxy *defproxy, int parse_flags);
int srv_update_addr(struct server *s, void *ip, int ip_sin_family, const char *updater);
const char *srv_update_addr_port(struct server *s, const char *addr, const char *port, char *updater);
diff --git a/src/server.c b/src/server.c
index 5f39d51..fe50fb9 100644
--- a/src/server.c
+++ b/src/server.c
@@ -2168,7 +2168,7 @@
* <srv_tmpl> distinguishes these two cases (must be 1 if <srv> is a template,
* 0 if not).
*/
-static void srv_settings_cpy(struct server *srv, const struct server *src, int srv_tmpl)
+void srv_settings_cpy(struct server *srv, const struct server *src, int srv_tmpl)
{
/* Connection source settings copy */
srv_conn_src_cpy(srv, src);