CLEANUP: muxes: Consider stream's sd as defined in .show_fd callback functions

In muxes, the stream-endoint descriptor of a stream is always defined. Thus,
in .show_fd callback functions, there is no reason to test it.

This patch should address the issue #1727.
.
This commit is contained in:
Christopher Faulet 2022-05-30 08:45:15 +02:00
parent 560b8da258
commit 186367f499
3 changed files with 13 additions and 16 deletions

View File

@ -4192,12 +4192,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),
fcgi_strm_sc(fstrm));
if (fstrm->sd) {
chunk_appendf(msg, " .sd.flg=0x%08x", se_fl_get(fstrm->sd));
if (!se_fl_test(fstrm->sd, SE_FL_ORPHAN))
chunk_appendf(msg, " .sc.flg=0x%08x .sc.app=%p",
fcgi_strm_sc(fstrm)->flags, fcgi_strm_sc(fstrm)->app);
}
chunk_appendf(msg, " .sd.flg=0x%08x", se_fl_get(fstrm->sd));
if (!se_fl_test(fstrm->sd, SE_FL_ORPHAN))
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);
if (fstrm->subs) {
chunk_appendf(&trash, "(ev=%d tl=%p", fstrm->subs->events, fstrm->subs->tasklet);

View File

@ -3914,13 +3914,12 @@ static int h1_show_fd(struct buffer *msg, struct connection *conn)
h1s, h1s->flags, se_fl_get(h1s->sd),
h1m_state_str(h1s->req.state),
h1m_state_str(h1s->res.state), method, h1s->status);
if (h1s->sd) {
chunk_appendf(msg, " .sd.flg=0x%08x",
se_fl_get(h1s->sd));
if (!se_fl_test(h1s->sd, SE_FL_ORPHAN))
chunk_appendf(msg, " .sc.flg=0x%08x .sc.app=%p",
h1s_sc(h1s)->flags, h1s_sc(h1s)->app);
}
chunk_appendf(msg, " .sd.flg=0x%08x", se_fl_get(h1s->sd));
if (!se_fl_test(h1s->sd, SE_FL_ORPHAN))
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);
if (h1s->subs) {
chunk_appendf(&trash, "(ev=%d tl=%p", h1s->subs->events, h1s->subs->tasklet);

View File

@ -6767,9 +6767,7 @@ static int h2_show_fd(struct buffer *msg, struct connection *conn)
h2s_sc(h2s)->flags, h2s_sc(h2s)->app);
chunk_appendf(msg, "sd=%p", h2s->sd);
if (h2s->sd)
chunk_appendf(msg, "(.flg=0x%08x)",
se_fl_get(h2s->sd));
chunk_appendf(msg, "(.flg=0x%08x)", se_fl_get(h2s->sd));
chunk_appendf(&trash, " .subs=%p", h2s->subs);
if (h2s->subs) {