CLEANUP: muxes: Remove useless if condition in show_fd function

In H1, H2 and FCGI muxes, in the show_fd function, there is duplicated test on
the stream's subs field.

This patch fixes the issue #1142. It may be backported as far as 2.2.
This commit is contained in:
Christopher Faulet 2021-02-25 10:06:29 +01:00
parent 456f45f301
commit 6c93c4ef08
3 changed files with 22 additions and 28 deletions

View File

@ -4126,14 +4126,12 @@ static int fcgi_show_fd(struct buffer *msg, struct connection *conn)
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, ")");
}
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, ")");
}
}
return 0;

View File

@ -3540,16 +3540,14 @@ static int h1_show_fd(struct buffer *msg, struct connection *conn)
chunk_appendf(&trash, " .subs=%p", h1s->subs);
if (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=",
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, ")");
}
chunk_appendf(&trash, "(ev=%d tl=%p", h1s->subs->events, h1s->subs->tasklet);
chunk_appendf(&trash, " 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, ")");
}
}
return ret;

View File

@ -6495,16 +6495,14 @@ static int h2_show_fd(struct buffer *msg, struct connection *conn)
chunk_appendf(&trash, " .subs=%p", h2s->subs);
if (h2s->subs) {
if (h2s->subs) {
chunk_appendf(&trash, "(ev=%d tl=%p", h2s->subs->events, h2s->subs->tasklet);
chunk_appendf(&trash, " tl.calls=%d tl.ctx=%p tl.fct=",
h2s->subs->tasklet->calls,
h2s->subs->tasklet->context);
if (h2s->subs->tasklet->calls >= 1000000)
ret = 1;
resolve_sym_name(&trash, NULL, h2s->subs->tasklet->process);
chunk_appendf(&trash, ")");
}
chunk_appendf(&trash, "(ev=%d tl=%p", h2s->subs->events, h2s->subs->tasklet);
chunk_appendf(&trash, " tl.calls=%d tl.ctx=%p tl.fct=",
h2s->subs->tasklet->calls,
h2s->subs->tasklet->context);
if (h2s->subs->tasklet->calls >= 1000000)
ret = 1;
resolve_sym_name(&trash, NULL, h2s->subs->tasklet->process);
chunk_appendf(&trash, ")");
}
}
return ret;