From: Christopher Faulet Date: Wed, 10 Nov 2021 09:30:15 +0000 (+0100) Subject: MINOR: mux-h1: Slightly Improve H1 traces X-Git-Tag: v2.5-dev14~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=99293b03807de8a357cf7153fcc0c15f716238c2;p=thirdparty%2Fhaproxy.git MINOR: mux-h1: Slightly Improve H1 traces Connection and conn-stream pointers and flags are now dumped, if available, in each trace messages. In addition, shutr and shutw mode is now reported. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 63270e9149..104b97f8f9 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -325,8 +325,13 @@ static void h1_trace(enum trace_level level, uint64_t mask, const struct trace_s /* Display h1c info and, if defined, h1s info (pointer + flags) */ chunk_appendf(&trace_buf, " - h1c=%p(0x%08x)", h1c, h1c->flags); - if (h1s) + if (h1c->conn) + chunk_appendf(&trace_buf, " conn=%p(0x%08x)", h1c->conn, h1c->conn->flags); + if (h1s) { chunk_appendf(&trace_buf, " h1s=%p(0x%08x)", h1s, h1s->flags); + if (h1s->cs) + chunk_appendf(&trace_buf, " cs=%p(0x%08x)", h1s->cs, h1s->cs->flags); + } if (src->verbosity == H1_VERB_MINIMAL) return; @@ -3245,7 +3250,7 @@ static void h1_shutr(struct conn_stream *cs, enum cs_shr_mode mode) return; h1c = h1s->h1c; - TRACE_ENTER(H1_EV_STRM_SHUT, h1c->conn, h1s); + TRACE_ENTER(H1_EV_STRM_SHUT, h1c->conn, h1s, 0, (size_t[]){mode}); if (cs->flags & CS_FL_SHR) goto end; @@ -3288,7 +3293,7 @@ static void h1_shutw(struct conn_stream *cs, enum cs_shw_mode mode) return; h1c = h1s->h1c; - TRACE_ENTER(H1_EV_STRM_SHUT, h1c->conn, h1s); + TRACE_ENTER(H1_EV_STRM_SHUT, h1c->conn, h1s, 0, (size_t[]){mode}); if (cs->flags & CS_FL_SHW) goto end;