diff --git a/include/haproxy/server.h b/include/haproxy/server.h index b295ebd038..5ca0fe90dc 100644 --- a/include/haproxy/server.h +++ b/include/haproxy/server.h @@ -44,7 +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); -int parse_server(const char *file, int linenum, char **args, struct proxy *curproxy, struct proxy *defproxy, int parse_addr, int in_peers_section, int initial_resolve); +int parse_server(const char *file, int linenum, char **args, struct proxy *curproxy, const struct proxy *defproxy, int parse_addr, int in_peers_section, int initial_resolve); int update_server_addr(struct server *s, void *ip, int ip_sin_family, const char *updater); const char *update_server_addr_port(struct server *s, const char *addr, const char *port, char *updater); struct server *server_find_by_id(struct proxy *bk, int id); diff --git a/src/server.c b/src/server.c index a77579abef..e95580fe1c 100644 --- a/src/server.c +++ b/src/server.c @@ -1940,7 +1940,7 @@ static int server_template_init(struct server *srv, struct proxy *px) } int parse_server(const char *file, int linenum, char **args, struct proxy *curproxy, - struct proxy *defproxy, int parse_addr, int in_peers_section, int initial_resolve) + const struct proxy *defproxy, int parse_addr, int in_peers_section, int initial_resolve) { struct server *newsrv = NULL; const char *err = NULL;