From: Christopher Faulet Date: Wed, 2 Jan 2019 13:34:39 +0000 (+0100) Subject: MINOR: stats/htx: Call channel_add_input instead of updating channel state by hand X-Git-Tag: v2.0-dev1~304 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5adbeeb336d244176b748d4f1ec271584c32131b;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/stats.c b/src/stats.c index f69aa90abd..bb6fa47f05 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)