From da0d2cb698bf45f2e4afb2e278a1b02c6f953b0d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 23 Apr 2023 00:04:36 +0200 Subject: [PATCH] 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. --- include/haproxy/proxy.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/haproxy/proxy.h b/include/haproxy/proxy.h index 0390772..547c671 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); } -- 1.7.10.4