mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-10 17:32:03 -04:00
CLEANUP: mux-h2: fix minor output debugging format issues
In h2_dump_h2s_info(), the tl.calls was being printed as signed instead of unsigned, which is not correct but harmless (only used with "show fd"). In the same function, we don't check if h2s->sd is valid while dereferencing it. In practise it is valid since "show fd" is run under thread isolation, but it's far from being obvious, and if conditions would later change, we don't know it could be printed between h2s_new() and h2s_frt_stream_new(). Finally in h2s_make_data() a wrong set of H2_EV_RX_* flags were used instead of H2_EV_TX_* to emit traces.
This commit is contained in:
parent
fa9cefd277
commit
e9cc913e3c
1 changed files with 4 additions and 3 deletions
|
|
@ -7340,7 +7340,7 @@ static size_t h2s_make_data(struct h2s *h2s, struct buffer *buf, size_t count)
|
|||
h2s->flags |= H2_SF_BLK_MBUSY;
|
||||
}
|
||||
else {
|
||||
TRACE_ERROR("Request DATA frame for aborted tunnel", H2_EV_RX_FRAME|H2_EV_RX_DATA, h2c->conn, h2s);
|
||||
TRACE_ERROR("Request DATA frame for aborted tunnel", H2_EV_TX_FRAME|H2_EV_TX_DATA, h2c->conn, h2s);
|
||||
h2s_error(h2s, H2_ERR_CANCEL);
|
||||
}
|
||||
goto end;
|
||||
|
|
@ -8499,7 +8499,8 @@ static int h2_dump_h2s_info(struct buffer *msg, const struct h2s *h2s, const cha
|
|||
h2s_sc(h2s)->flags, h2s_sc(h2s)->app);
|
||||
|
||||
chunk_appendf(msg, " .sd=%p", h2s->sd);
|
||||
chunk_appendf(msg, "(.flg=0x%08x .evts=%s)", se_fl_get(h2s->sd), tevt_evts2str(h2s->sd->term_evts_log));
|
||||
if (h2s->sd)
|
||||
chunk_appendf(msg, "(.flg=0x%08x .evts=%s)", se_fl_get(h2s->sd), tevt_evts2str(h2s->sd->term_evts_log));
|
||||
|
||||
if (pfx)
|
||||
chunk_appendf(msg, "\n%s", pfx);
|
||||
|
|
@ -8507,7 +8508,7 @@ static int h2_dump_h2s_info(struct buffer *msg, const struct h2s *h2s, const cha
|
|||
chunk_appendf(msg, " .subs=%p", h2s->subs);
|
||||
if (h2s->subs) {
|
||||
chunk_appendf(msg, "(ev=%d tl=%p", h2s->subs->events, h2s->subs->tasklet);
|
||||
chunk_appendf(msg, " tl.calls=%d tl.ctx=%p tl.fct=",
|
||||
chunk_appendf(msg, " tl.calls=%u tl.ctx=%p tl.fct=",
|
||||
h2s->subs->tasklet->calls,
|
||||
h2s->subs->tasklet->context);
|
||||
if (h2s->subs->tasklet->calls >= 1000000)
|
||||
|
|
|
|||
Loading…
Reference in a new issue