From b9af88151ac31f570d3961143ab96e92acb7cc3b Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 4 Jan 2019 14:30:44 +0100 Subject: [PATCH] MINOR: stream/htx: Add info about the HTX structs in "show sess all" command For HTX streams, info about the HTX structure is now dumped for the request and the response channels in "show sess all" command. The patch may be backported to 1.9. --- src/stream.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/stream.c b/src/stream.c index ac323b1e75..8bf0917f8e 100644 --- a/src/stream.c +++ b/src/stream.c @@ -3087,6 +3087,16 @@ static int stats_dump_full_strm_to_buffer(struct stream_interface *si, struct st strm->txn ? strm->txn->req.next : 0, (unsigned int)ci_data(&strm->req), (unsigned int)strm->req.buf.size); + if (IS_HTX_STRM(strm)) { + struct htx *htx = htxbuf(&strm->req.buf); + + chunk_appendf(&trash, + " htx=%p size=%u data=%u used=%u wrap=%s extra=%llu\n", + htx, htx->size, htx->data, htx->used, + (!htx->used || htx->tail+1 == htx->wrap) ? "NO" : "YES", + (unsigned long long)htx->extra); + } + chunk_appendf(&trash, " res=%p (f=0x%06x an=0x%x pipe=%d tofwd=%d total=%lld)\n" " an_exp=%s", @@ -3116,6 +3126,16 @@ static int stats_dump_full_strm_to_buffer(struct stream_interface *si, struct st strm->txn ? strm->txn->rsp.next : 0, (unsigned int)ci_data(&strm->res), (unsigned int)strm->res.buf.size); + if (IS_HTX_STRM(strm)) { + struct htx *htx = htxbuf(&strm->res.buf); + + chunk_appendf(&trash, + " htx=%p flags=0x%x size=%u data=%u used=%u wrap=%s extra=%llu\n", + htx, htx->flags, htx->size, htx->data, htx->used, + (!htx->used || htx->tail+1 == htx->wrap) ? "NO" : "YES", + (unsigned long long)htx->extra); + } + if (ci_putchk(si_ic(si), &trash) == -1) { si_rx_room_blk(si); return 0; -- 2.39.5