]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http-htx: defpx must be a const in proxy_dup_default_conf_errors()
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Feb 2021 07:40:29 +0000 (08:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Feb 2021 15:23:46 +0000 (16:23 +0100)
This is just an API bug but it's annoying when trying to tidy the code.
The default proxy passed in argument must be a const and not a variable.
No backport is needed as it only impacts new code.

include/haproxy/http_htx.h
src/http_htx.c

index 70df6806f05e879f719c0e0e0ed7b007139f076a..fbd4438de2b62880e9c1274a25085f1bcd878123 100644 (file)
@@ -70,7 +70,7 @@ struct buffer *http_load_errorfile(const char *file, char **errmsg);
 struct buffer *http_load_errormsg(const char *key, const struct ist msg, char **errmsg);
 struct buffer *http_parse_errorfile(int status, const char *file, char **errmsg);
 struct buffer *http_parse_errorloc(int errloc, int status, const char *url, char **errmsg);
-int proxy_dup_default_conf_errors(struct proxy *curpx, struct proxy *defpx, char **errmsg);
+int proxy_dup_default_conf_errors(struct proxy *curpx, const struct proxy *defpx, char **errmsg);
 void proxy_release_conf_errors(struct proxy *px);
 
 #endif /* _HAPROXY_HTTP_HTX_H */
index bb3d8d0f09db94f9124643aea04f88566ac2bf17..e2e6ce1ef35a01e5645b380d2c194c6dbc7c85c3 100644 (file)
@@ -2080,7 +2080,7 @@ static int post_check_errors()
        return err_code;
 }
 
-int proxy_dup_default_conf_errors(struct proxy *curpx, struct proxy *defpx, char **errmsg)
+int proxy_dup_default_conf_errors(struct proxy *curpx, const struct proxy *defpx, char **errmsg)
 {
        struct conf_errors *conf_err, *new_conf_err = NULL;
        int ret = 0;