MEDIUM: mux: Remove const on the buffer in mux->snd_buf()
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Jul 2018 09:59:41 +0000 (11:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Aug 2018 12:36:52 +0000 (14:36 +0200)
commitd44a9b36277b9777676a8d31ae2b34bf8d056297
tree9828fa726f7b17bd6593ffee6766f2a99ba3c0f2
parenta8694654ba021bf1e0e560a98ab5e70dc44d212e
MEDIUM: mux: Remove const on the buffer in mux->snd_buf()

This is a partial revert of the commit deccd1116 ("MEDIUM: mux: make
mux->snd_buf() take the byte count in argument"). It is a requirement to do
zero-copy transfers. This will be mandatory when the TX buffer of the
conn_stream will be used.

So, now, data are consumed by mux->snd_buf() and not only sent. So it needs to
update the buffer state. On its side, the caller must be aware the buffer can be
replaced y an empty or unallocated one.

As a side effet of this change, the function co_set_data() is now only responsible
to update the channel set, by update ->output field.
include/proto/channel.h
include/types/connection.h
src/checks.c
src/mux_h2.c
src/mux_pt.c