]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stconn: Explicitly use an appctx to attach a stconn on it
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 10 Jan 2024 13:17:14 +0000 (14:17 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Feb 2024 14:02:22 +0000 (15:02 +0100)
In sc_attach_applet, an untyped pointer (void *) was used to attach a SC on
an applet. There is no reason to not use the right type here. So now a
pointer on an appctx is explicitly used.

src/stconn.c

index 74efca7efd38a9e3d72d439b6530a9b01e641dc9..a5ab35127451c3264d3346f26c11e4a7633998d1 100644 (file)
@@ -312,9 +312,9 @@ int sc_attach_mux(struct stconn *sc, void *sd, void *ctx)
  * removed. This function is called by a stream when a backend applet is
  * registered.
  */
-static void sc_attach_applet(struct stconn *sc, void *sd)
+static void sc_attach_applet(struct stconn *sc, struct appctx *appctx)
 {
-       sc->sedesc->se = sd;
+       sc->sedesc->se = appctx;
        sc_ep_set(sc, SE_FL_T_APPLET);
        sc_ep_clr(sc, SE_FL_DETACHED);
        if (sc_strm(sc)) {