MINOR: channel: Add co_set_data().

Add a new function that lets one set the channel's output amount.
This commit is contained in:
Olivier Houchard 2018-06-29 16:17:34 +02:00 committed by Willy Tarreau
parent 3ee8344b7b
commit d4251a7e98

View file

@ -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