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.
This commit is contained in:
Willy Tarreau 2023-04-23 00:04:36 +02:00
parent f6a8444f55
commit da0d2cb698

View File

@ -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);
}