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>
Thu, 10 Mar 2022 09:45:25 +0000 (10:45 +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>

src/proxy.c

index c671831..6890eb0 100644 (file)
@@ -378,6 +378,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";
 }