projects
/
haproxy-3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6a8444
)
MINOR: proxy: make proxy_type_str() recognize peers sections
author
Willy Tarreau
<w@1wt.eu>
Sat, 22 Apr 2023 22:04:36 +0000
(
00:04
+0200)
committer
Willy Tarreau
<w@1wt.eu>
Sun, 23 Apr 2023 07:46:15 +0000
(09:46 +0200)
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
patch
|
blob
|
history
diff --git
a/include/haproxy/proxy.h
b/include/haproxy/proxy.h
index
0390772
..
547c671
100644
(file)
--- 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);
}