]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-fcgi: fix the "show fd" dest buffer for the subscriber
authorWilly Tarreau <w@1wt.eu>
Fri, 2 Sep 2022 12:22:38 +0000 (14:22 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Sep 2022 12:23:56 +0000 (14:23 +0200)
Commit 1776ffb97 ("MINOR: mux-fcgi: make the "show fd" helper also decode
the fstrm subscriber when known") improved the output of "show fd" for the
FCGI mux, but the output is sent to the trash buffer instead of the msg
argument. It turns out that this has no effect right now as the caller
passes the trash but this is risky.

This should be backported to 2.4.

src/mux_fcgi.c

index 6afa9ad8847fb0e79c3ffe0bfbfe1780b998a6d4..c93ddd46578bb03fa64adcf8a5d8c9402decb0fe 100644 (file)
@@ -4198,14 +4198,14 @@ static int fcgi_show_fd(struct buffer *msg, struct connection *conn)
                        chunk_appendf(msg, " .sc.flg=0x%08x .sc.app=%p",
                                      fcgi_strm_sc(fstrm)->flags, fcgi_strm_sc(fstrm)->app);
 
-               chunk_appendf(&trash, " .subs=%p", fstrm->subs);
+               chunk_appendf(msg, " .subs=%p", fstrm->subs);
                if (fstrm->subs) {
-                       chunk_appendf(&trash, "(ev=%d tl=%p", fstrm->subs->events, fstrm->subs->tasklet);
-                       chunk_appendf(&trash, " tl.calls=%d tl.ctx=%p tl.fct=",
+                       chunk_appendf(msg, "(ev=%d tl=%p", fstrm->subs->events, fstrm->subs->tasklet);
+                       chunk_appendf(msg, " tl.calls=%d tl.ctx=%p tl.fct=",
                                      fstrm->subs->tasklet->calls,
                                      fstrm->subs->tasklet->context);
-                       resolve_sym_name(&trash, NULL, fstrm->subs->tasklet->process);
-                       chunk_appendf(&trash, ")");
+                       resolve_sym_name(msg, NULL, fstrm->subs->tasklet->process);
+                       chunk_appendf(msg, ")");
                }
        }
        return 0;