]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stconn: Be able to detect applets using HTX
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 11 Jan 2024 09:03:38 +0000 (10:03 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Feb 2024 14:02:19 +0000 (15:02 +0100)
IS_HXT_SC() macro is only usable if the stream-connector is attached to a
connection. It is a bit restrictive because this cannot work if the SC is
attached to an applet. So let's fix that be adding the support of applets
too.

include/haproxy/stconn.h

index 7869fa340625ac04c355650d479e83b85868e888..dff604403a2dd099287c2e15de04f2a41d42f333 100644 (file)
@@ -34,7 +34,7 @@ struct appctx;
 struct stream;
 struct check;
 
-#define IS_HTX_SC(sc)     (sc_conn(sc) && IS_HTX_CONN(__sc_conn(sc)))
+#define IS_HTX_SC(sc)     ((sc_conn(sc) && IS_HTX_CONN(__sc_conn(sc))) || (sc_appctx(sc) && IS_HTX_STRM(__sc_strm(sc))))
 
 struct sedesc *sedesc_new();
 void sedesc_free(struct sedesc *sedesc);