]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: muxes: Add a flag to specify a multiplexer uses the HTX
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 3 Apr 2019 07:53:32 +0000 (09:53 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Apr 2019 20:06:53 +0000 (22:06 +0200)
A multiplexer must now set the flag MX_FL_HTX when it uses the HTX to structured
the data exchanged with channels. the muxes h1 and h2 set this flag. Of course,
for the mux h2, it is set on h2_htx_ops only.

include/types/connection.h
src/mux_h1.c
src/mux_h2.c

index c7d968ca06e68ac663d6e4479a2eef33761e9384..1a1409b023a4bd2cd4a136de7b87963abab41b72 100644 (file)
@@ -294,6 +294,7 @@ enum {
 enum {
        MX_FL_NONE        = 0x00000000,
        MX_FL_CLEAN_ABRT  = 0x00000001, /* abort is clearly reported as an error */
+       MX_FL_HTX         = 0x00000002, /* set if it is an HTX multiplexer */
 };
 
 /* xprt_ops describes transport-layer operations for a connection. They
index d6ea268105f4d457d237000f5a09151d4724f835..4dcbcafcf9411068b5daf4859424667d9dd2df61 100644 (file)
@@ -2343,7 +2343,7 @@ static const struct mux_ops mux_h1_ops = {
        .shutw       = h1_shutw,
        .show_fd     = h1_show_fd,
        .reset       = h1_reset,
-       .flags       = MX_FL_NONE,
+       .flags       = MX_FL_HTX,
        .name        = "h1",
 };
 
index 1e81128caf65041a651708b85b58cb5bd9302ffb..3e501502942a16e728146e1e80127bf1bc00eb36 100644 (file)
@@ -5682,7 +5682,7 @@ static const struct mux_ops h2_htx_ops = {
        .shutr = h2_shutr,
        .shutw = h2_shutw,
        .show_fd = h2_show_fd,
-       .flags = MX_FL_CLEAN_ABRT,
+       .flags = MX_FL_CLEAN_ABRT|MX_FL_HTX,
        .name = "H2",
 };