From: Willy Tarreau Date: Sat, 22 Apr 2023 22:04:36 +0000 (+0200) Subject: MINOR: proxy: make proxy_type_str() recognize peers sections X-Git-Tag: v2.8-dev8~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da0d2cb698bf45f2e4afb2e278a1b02c6f953b0d;p=thirdparty%2Fhaproxy.git MINOR: proxy: make proxy_type_str() recognize peers sections Now proxy_type_str() will emit "peers section" when the mode is set to peers, so as to ease sharing more code between peers and proxies. --- diff --git a/include/haproxy/proxy.h b/include/haproxy/proxy.h index 039077242c..547c6718fa 100644 --- a/include/haproxy/proxy.h +++ b/include/haproxy/proxy.h @@ -92,6 +92,8 @@ struct proxy *cli_find_frontend(struct appctx *appctx, const char *arg); */ static inline const char *proxy_type_str(struct proxy *proxy) { + if (proxy->mode == PR_MODE_PEERS) + return "peers section"; return proxy_cap_str(proxy->cap); }