]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream: make strm_dump_to_buffer() show the list of filters
authorWilly Tarreau <w@1wt.eu>
Thu, 28 Sep 2023 05:40:35 +0000 (07:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Sep 2023 07:20:27 +0000 (09:20 +0200)
That's one of the rare pieces of information that was not present in
the full dump and only in the short one, the list of filters the stream
is subscribed to (however the current filter was present and more
detailed).

src/stream.c

index a13ebe42974741c2e538269763a20ef01e7c0b19..35759037c0d17a3d178b28a55d1533e998306e6b 100644 (file)
@@ -3472,6 +3472,18 @@ static void strm_dump_to_buffer(struct buffer *buf, const struct stream *strm, u
                              tmpctx->t->nice, tmpctx->t->calls, read_freq_ctr(&tmpctx->call_rate));
        }
 
+       if (HAS_FILTERS(strm)) {
+               const struct filter *flt;
+
+               chunk_appendf(buf, "  filters={");
+               list_for_each_entry(flt, &strm->strm_flt.filters, list) {
+                       if (flt->list.p != &strm->strm_flt.filters)
+                               chunk_appendf(buf, ", ");
+                       chunk_appendf(buf, "%p=\"%s\"", flt, FLT_ID(flt));
+               }
+               chunk_appendf(buf, "}\n");
+       }
+
        chunk_appendf(buf,
                     "  req=%p (f=0x%06x an=0x%x pipe=%d tofwd=%d total=%lld)\n"
                     "      an_exp=%s buf=%p data=%p o=%u p=%u i=%u size=%u\n",