mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-19 10:14:41 +00:00
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:
parent
456f45f301
commit
6c93c4ef08
@ -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;
|
||||
|
18
src/mux_h1.c
18
src/mux_h1.c
@ -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;
|
||||
|
18
src/mux_h2.c
18
src/mux_h2.c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user