From 410546145b58adc035c357fb89163ced4fb84829 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 2 Sep 2022 14:22:38 +0200 Subject: [PATCH] BUG/MINOR: mux-fcgi: fix the "show fd" dest buffer for the subscriber 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index 6afa9ad88..c93ddd465 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -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; -- 2.47.3