From 5adbeeb336d244176b748d4f1ec271584c32131b Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 2 Jan 2019 14:34:39 +0100 Subject: [PATCH] MINOR: stats/htx: Call channel_add_input instead of updating channel state by hand This way we are sure the channel state is always correctly upadated, especially the amount of data directly forwarded. For the stats applet, it is not a bug because the fast forwarding is never used (the response is chunked and the HTX extra field is always set to 0). This patch must be backported to 1.9. --- src/stats.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/stats.c b/src/stats.c index f69aa90ab..bb6fa47f0 100644 --- a/src/stats.c +++ b/src/stats.c @@ -245,10 +245,8 @@ static int stats_putchk(struct channel *chn, struct htx *htx, struct buffer *chk if (htx) { if (!htx_add_data(htx, ist2(chk->area, chk->data))) return 0; - chn->total += chk->data; + channel_add_input(chn, chk->data); chk->data = 0; - /* notify that some data was read from the SI into the buffer */ - chn->flags |= CF_READ_PARTIAL; } else { if (ci_putchk(chn, chk) == -1)