mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-10-08 06:01:29 +02:00
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.