From 9f38f5aa80efb97d5cb6a08cdd520b047869b659 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 3 Apr 2019 09:53:32 +0200 Subject: [PATCH] MINOR: muxes: Add a flag to specify a multiplexer uses the HTX 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 | 1 + src/mux_h1.c | 2 +- src/mux_h2.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/types/connection.h b/include/types/connection.h index c7d968ca0..1a1409b02 100644 --- a/include/types/connection.h +++ b/include/types/connection.h @@ -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 diff --git a/src/mux_h1.c b/src/mux_h1.c index d6ea26810..4dcbcafcf 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -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", }; diff --git a/src/mux_h2.c b/src/mux_h2.c index 1e81128ca..3e5015029 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -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", };