BUG/MINOR: stconn: Fix sc_mux_strm() return value
Since the begining, this function returns a pointer on an appctx while it
should be a void pointer. It is the caller responsibility to cast it to the
right type, the corresponding mux stream in this case.
However, it is not a big deal because this function is unused for now. Only
the unsafe one is used.
This patch must be backported as far as 2.6.
(cherry picked from commit f58883002c6fd90b3bf8a70e779b7e72e76cec2c)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
(cherry picked from commit a45a4bb7dfebd1ba8eb95cc2aa4c1db2be326ccb)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
diff --git a/include/haproxy/stconn.h b/include/haproxy/stconn.h
index 33ae1e3..183b7b7 100644
--- a/include/haproxy/stconn.h
+++ b/include/haproxy/stconn.h
@@ -235,7 +235,7 @@
{
return __sc_endp(sc);
}
-static inline struct appctx *sc_mux_strm(const struct stconn *sc)
+static inline void *sc_mux_strm(const struct stconn *sc)
{
if (sc_ep_test(sc, SE_FL_T_MUX))
return __sc_mux_strm(sc);