From: Christopher Faulet Date: Thu, 16 Apr 2020 08:03:58 +0000 (+0200) Subject: MINOR: connection: Add macros to know if a conn or a cs uses an HTX mux X-Git-Tag: v2.2-dev7~102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e60abd1a064a9c945a648cf14f4bc24bfb6c2772;p=thirdparty%2Fhaproxy.git MINOR: connection: Add macros to know if a conn or a cs uses an HTX mux IS_HTX_CONN() and IS_HTX_CS may now be used to know if a connection or a conn-stream use an HTX based multiplexer. --- diff --git a/include/proto/connection.h b/include/proto/connection.h index 30730f0ce1..97c789964b 100644 --- a/include/proto/connection.h +++ b/include/proto/connection.h @@ -39,6 +39,9 @@ extern struct pool_head *pool_head_authority; extern struct xprt_ops *registered_xprt[XPRT_ENTRIES]; extern struct mux_proto_list mux_proto_list; +#define IS_HTX_CONN(conn) ((conn)->mux && ((conn)->mux->flags & MX_FL_HTX)) +#define IS_HTX_CS(cs) (IS_HTX_CONN((cs)->conn)) + /* I/O callback for fd-based connections. It calls the read/write handlers * provided by the connection's sock_ops. */