BUG/MINOR: add missing modes in proxy_mode_str()
authorWilliam Lallemand <wlallemand@haproxy.org>
Tue, 8 Mar 2022 10:50:59 +0000 (11:50 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Mar 2022 10:01:41 +0000 (11:01 +0100)
Add the missing PR_MODE_SYSLOG and PR_MODE_PEERS in proxy_mode_str().

Could be backported in every maintained versions.

(cherry picked from commit 06715af9e565c82f39aa157c09d5b9e823490d14)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit e92b1b677024e348f659842389cafa95d35240af)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit fc24fe20442733a2b8705d293baccd87704ed270)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

src/proxy.c

index e83a014..b7988ca 100644 (file)
@@ -140,6 +140,10 @@ const char *proxy_mode_str(int mode) {
                return "http";
        else if (mode == PR_MODE_CLI)
                return "cli";
+       else if (mode == PR_MODE_SYSLOG)
+               return "syslog";
+       else if (mode == PR_MODE_PEERS)
+               return "peers";
        else
                return "unknown";
 }