From: Olivier Houchard Date: Fri, 29 Jun 2018 14:17:34 +0000 (+0200) Subject: MINOR: channel: Add co_set_data(). X-Git-Tag: v1.9-dev1~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4251a7e98878975375423bc309cc491cab28244;p=thirdparty%2Fhaproxy.git MINOR: channel: Add co_set_data(). Add a new function that lets one set the channel's output amount. --- diff --git a/include/proto/channel.h b/include/proto/channel.h index 8e1ae3f866..26bc481d27 100644 --- a/include/proto/channel.h +++ b/include/proto/channel.h @@ -198,6 +198,12 @@ static inline void c_realign_if_empty(struct channel *chn) b_realign_if_empty(chn->buf); } +/* Sets the amount of output for the channel */ +static inline void co_set_data(struct channel *c, size_t output) +{ + c->buf->o = output; +} + /* co_head() : returns a pointer to the beginning of output data in the buffer. * The "__" variants don't support wrapping, "ofs" are relative to