]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-fcgi: make the "show fd" helper also decode the fstrm subscriber when...
authorWilly Tarreau <w@1wt.eu>
Wed, 20 Jan 2021 16:10:46 +0000 (17:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Jan 2021 16:17:40 +0000 (17:17 +0100)
When dumping a live fcgi stream, also take the opportunity for reporting
the subscriber including the event, tasklet, handler and context.

src/mux_fcgi.c

index 4ce916f048b7a14abde7a92eb94042d39c24d285..4e2f0cced053e9ddb93c2a4373ddda196551dbd2 100644 (file)
@@ -4104,6 +4104,17 @@ static void fcgi_show_fd(struct buffer *msg, struct connection *conn)
                if (fstrm->cs)
                        chunk_appendf(msg, " .cs.flg=0x%08x .cs.data=%p",
                                      fstrm->cs->flags, fstrm->cs->data);
+               chunk_appendf(&trash, " .subs=%p", fstrm->subs);
+               if (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=",
+                                             fstrm->subs->tasklet->calls,
+                                             fstrm->subs->tasklet->context);
+                               resolve_sym_name(&trash, NULL, fstrm->subs->tasklet->process);
+                               chunk_appendf(&trash, ")");
+                       }
+               }
        }
 }