]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: channel: Add co_set_data().
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 29 Jun 2018 14:17:34 +0000 (16:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Jul 2018 14:23:42 +0000 (16:23 +0200)
Add a new function that lets one set the channel's output amount.

include/proto/channel.h

index 8e1ae3f866cf384a4823930dc860d429e30291bf..26bc481d274d7d57e980fa8e4136492f6758b161 100644 (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