]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: Add macros to know if a conn or a cs uses an HTX mux
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 16 Apr 2020 08:03:58 +0000 (10:03 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Apr 2020 07:39:38 +0000 (09:39 +0200)
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.

include/proto/connection.h

index 30730f0ce19e8264d2286512f9b76e410497c3f5..97c789964b6fec952da0c454aac9e8a1c72cefbb 100644 (file)
@@ -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.
  */