]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: server: Export srv_settings_cpy() function
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 3 Aug 2022 09:28:08 +0000 (11:28 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 3 Aug 2022 09:28:52 +0000 (11:28 +0200)
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.

include/haproxy/server.h
src/server.c

index 2572b72305d8a47ddbd15a88b541150ae0208465..72387448485a3ceefabdadf1d424b12e33ac9647 100644 (file)
@@ -44,6 +44,7 @@ extern struct dict server_key_dict;
 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);
 int server_parse_sni_expr(struct server *newsrv, struct proxy *px, char **err);
index 73a73232e41a2fced6579f1fd0a17ff490bbd38d..debbd71e1f837ea43e40bca90a9108fd492d5fca 100644 (file)
@@ -2169,7 +2169,7 @@ int srv_prepare_for_resolution(struct server *srv, const char *hostname)
  * <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);