mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-12 08:49:29 +00:00
MINOR: muxes: Improve show_fd callbacks to dump endpoint flags
H1, H2 and FCGI multiplexers define a show_fd callback to dump some internal info. The stream endpoint and its flags are now dumped if it exists.
This commit is contained in:
parent
1336ccffab
commit
22050e0a2c
@ -4189,9 +4189,12 @@ static int fcgi_show_fd(struct buffer *msg, struct connection *conn)
|
||||
(unsigned int)b_data(&fstrm->rxbuf), b_orig(&fstrm->rxbuf),
|
||||
(unsigned int)b_head_ofs(&fstrm->rxbuf), (unsigned int)b_size(&fstrm->rxbuf),
|
||||
fstrm->cs);
|
||||
if (fstrm->cs)
|
||||
chunk_appendf(msg, " .cs.flg=0x%08x .cs.app=%p",
|
||||
fstrm->cs->flags, fstrm->cs->app);
|
||||
if (fstrm->endp) {
|
||||
chunk_appendf(msg, " .endp.flg=0x%08x", fstrm->endp->flags);
|
||||
if (!(fstrm->endp->flags & CS_EP_ORPHAN))
|
||||
chunk_appendf(msg, " .cs.flg=0x%08x .cs.app=%p",
|
||||
fstrm->cs->flags, fstrm->cs->app);
|
||||
}
|
||||
chunk_appendf(&trash, " .subs=%p", fstrm->subs);
|
||||
if (fstrm->subs) {
|
||||
chunk_appendf(&trash, "(ev=%d tl=%p", fstrm->subs->events, fstrm->subs->tasklet);
|
||||
|
14
src/mux_h1.c
14
src/mux_h1.c
@ -3889,15 +3889,17 @@ static int h1_show_fd(struct buffer *msg, struct connection *conn)
|
||||
method = http_known_methods[h1s->meth].ptr;
|
||||
else
|
||||
method = "UNKNOWN";
|
||||
chunk_appendf(msg, " h1s=%p h1s.flg=0x%x .req.state=%s .res.state=%s"
|
||||
chunk_appendf(msg, " h1s=%p h1s.flg=0x%x .endp.flg=0x%x .req.state=%s .res.state=%s"
|
||||
" .meth=%s status=%d",
|
||||
h1s, h1s->flags,
|
||||
h1s, h1s->flags, h1s->endp->flags,
|
||||
h1m_state_str(h1s->req.state),
|
||||
h1m_state_str(h1s->res.state), method, h1s->status);
|
||||
if (h1s->cs)
|
||||
chunk_appendf(msg, " .cs.flg=0x%08x .cs.app=%p",
|
||||
h1s->cs->flags, h1s->cs->app);
|
||||
|
||||
if (h1s->endp) {
|
||||
chunk_appendf(msg, " .endp.flg=0x%08x", h1s->endp->flags);
|
||||
if (!(h1s->endp->flags & CS_EP_ORPHAN))
|
||||
chunk_appendf(msg, " .cs.flg=0x%08x .cs.app=%p",
|
||||
h1s->cs->flags, h1s->cs->app);
|
||||
}
|
||||
chunk_appendf(&trash, " .subs=%p", h1s->subs);
|
||||
if (h1s->subs) {
|
||||
chunk_appendf(&trash, "(ev=%d tl=%p", h1s->subs->events, h1s->subs->tasklet);
|
||||
|
@ -6744,6 +6744,11 @@ static int h2_show_fd(struct buffer *msg, struct connection *conn)
|
||||
chunk_appendf(msg, "(.flg=0x%08x .app=%p)",
|
||||
h2s->cs->flags, h2s->cs->app);
|
||||
|
||||
chunk_appendf(msg, "endp=%p", h2s->endp);
|
||||
if (h2s->endp)
|
||||
chunk_appendf(msg, "(.flg=0x%08x)",
|
||||
h2s->endp->flags);
|
||||
|
||||
chunk_appendf(&trash, " .subs=%p", h2s->subs);
|
||||
if (h2s->subs) {
|
||||
chunk_appendf(&trash, "(ev=%d tl=%p", h2s->subs->events, h2s->subs->tasklet);
|
||||
|
Loading…
Reference in New Issue
Block a user