From: Willy Tarreau Date: Fri, 2 Sep 2022 12:22:38 +0000 (+0200) Subject: BUG/MINOR: mux-fcgi: fix the "show fd" dest buffer for the subscriber X-Git-Tag: v2.7-dev5~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=410546145b58adc035c357fb89163ced4fb84829;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index 6afa9ad884..c93ddd4657 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;