]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: fix the "show fd" dest buffer for the subscriber
authorWilly Tarreau <w@1wt.eu>
Fri, 2 Sep 2022 12:21:05 +0000 (14:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Sep 2022 12:23:56 +0000 (14:23 +0200)
Commit 150c4f8b7 ("MINOR: mux-h1: make the "show fd" helper also decode
the h1s subscriber when known") improved the output of "show fd" for the
H1 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_h1.c

index ddce75f8f53d4a8e086a67f9ed54a4f8a8611996..36103e721e729835cf76fe44776fcbced4bde7b8 100644 (file)
@@ -3933,16 +3933,16 @@ static int h1_show_fd(struct buffer *msg, struct connection *conn)
                        chunk_appendf(msg, " .sc.flg=0x%08x .sc.app=%p",
                                      h1s_sc(h1s)->flags, h1s_sc(h1s)->app);
 
-               chunk_appendf(&trash, " .subs=%p", h1s->subs);
+               chunk_appendf(msg, " .subs=%p", h1s->subs);
                if (h1s->subs) {
-                       chunk_appendf(&trash, "(ev=%d tl=%p", h1s->subs->events, h1s->subs->tasklet);
-                       chunk_appendf(&trash, " tl.calls=%d tl.ctx=%p tl.fct=",
+                       chunk_appendf(msg, "(ev=%d tl=%p", h1s->subs->events, h1s->subs->tasklet);
+                       chunk_appendf(msg, " tl.calls=%d tl.ctx=%p tl.fct=",
                                      h1s->subs->tasklet->calls,
                                      h1s->subs->tasklet->context);
                        if (h1s->subs->tasklet->calls >= 1000000)
                                ret = 1;
-                       resolve_sym_name(&trash, NULL, h1s->subs->tasklet->process);
-                       chunk_appendf(&trash, ")");
+                       resolve_sym_name(msg, NULL, h1s->subs->tasklet->process);
+                       chunk_appendf(msg, ")");
                }
        }
        return ret;