]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: applet: Use unsafe version to get stream from SC in the trace function
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Apr 2023 06:48:16 +0000 (08:48 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Apr 2023 06:48:17 +0000 (08:48 +0200)
When a trace message for an applet is dumped, if the SC exists, the stream
always exists too. There is no way to attached an applet to a health-check.
So, we can use the unsafe version __sc_strm() to get the stream.

This patch is related to #2106. Not sure it will be enough for
Coverity. However, there is no bug here.

src/applet.c

index 41f1b0803532ce0870e20ac2214e50f0d6793b24..a4702d48a35de3da1cf1fd482cf66fa2807ff7c7 100644 (file)
@@ -105,7 +105,7 @@ static void applet_trace(enum trace_level level, uint64_t mask, const struct tra
 
        sc = appctx_sc(appctx);
        if (sc) {
-               s = sc_strm(sc);
+               s = __sc_strm(sc);
                sco = sc_opposite(sc);
                ic = sc_ic(sc);
                oc = sc_oc(sc);