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.
This commit is contained in:
Christopher Faulet 2019-04-03 09:53:32 +02:00
parent 9b579106fe
commit 9f38f5aa80
3 changed files with 3 additions and 2 deletions

View 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

View 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",
};

View 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",
};