]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: htx: make htx_add_data() return the transmitted byte count
authorWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 08:30:11 +0000 (10:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 12:48:59 +0000 (14:48 +0200)
commit0a7ef02074962152125af897492162a4bbb7bf07
tree7c73a1dfe113868dfe0aba4cb8fd6145d4928b74
parentd4908fa465fe2291d8f43b1b5a46ccc2ebac7ad9
MINOR: htx: make htx_add_data() return the transmitted byte count

In order to later allow htx_add_data() to transmit partial blocks and
avoid defragmenting the buffer, we'll need to return the number of bytes
consumed. This first modification makes the function do this and its
callers take this into account. At the moment the function still works
atomically so it returns either the block size or zero. However all
call places have been adapted to consider any value between zero and
the block size.
include/common/htx.h
src/cache.c
src/hlua.c
src/http_htx.c
src/htx.c
src/mux_h1.c
src/mux_h2.c
src/proto_htx.c
src/stats.c