From: Christopher Faulet Date: Thu, 11 Jan 2024 09:03:38 +0000 (+0100) Subject: MINOR: stconn: Be able to detect applets using HTX X-Git-Tag: v3.0-dev3~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dd7ff0d67005683fff485921b9e0256ffe3f1cf;p=thirdparty%2Fhaproxy.git MINOR: stconn: Be able to detect applets using HTX 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. --- diff --git a/include/haproxy/stconn.h b/include/haproxy/stconn.h index 7869fa3406..dff604403a 100644 --- a/include/haproxy/stconn.h +++ b/include/haproxy/stconn.h @@ -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);