]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] add the splice_len member to the buffer struct in preparation of splice support
authorWilly Tarreau <w@1wt.eu>
Wed, 7 Jan 2009 18:33:39 +0000 (19:33 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Jan 2009 09:15:02 +0000 (10:15 +0100)
commitdcef33fa9b9cdc9637b1fc3abbe2b21198d18f29
tree6ee245580220164a23ff0cb580b635a762189739
parent6b66f3e4f6b22619bd551f8e33cbf7211c6c7cd0
[MINOR] add the splice_len member to the buffer struct in preparation of splice support

In preparation of splice support, let's add the splice_len member
to the buffer struct. An earlier implementation made it conditional,
which made the whole logics very complex due to a large number of
ifdefs.

Now BF_EMPTY is only set once both buf->l and buf->splice_len are
null. Splice_len is initialized to zero during buffer creation and
is currently not changed, so the whole logics remains unaffected.

When splice gets merged, splice_len will reflect the number of bytes
in flight out of the buffer but not yet sent, typically in a pipe for
the Linux case.
include/proto/buffers.h
include/types/buffers.h
src/stream_sock.c