]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MAJOR] buffers: fix the BF_EMPTY flag's meaning
authorWilly Tarreau <w@1wt.eu>
Sun, 20 Sep 2009 06:09:44 +0000 (08:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 20 Sep 2009 06:17:45 +0000 (08:17 +0200)
commitba0b63d2c76fb544a1331e33c303846f1b3f957d
tree1c01efcfb2a5a2b571ad61bdd54467d4d1a9fcb1
parent520d95e42b89cbb0a3f97ea72ee7f85121209741
[MAJOR] buffers: fix the BF_EMPTY flag's meaning

The BF_EMPTY flag was once used to indicate an empty buffer. However,
it was used half the time as meaning the buffer is empty for the reader,
and half the time as meaning there is nothing left to send.

"nothing to send" is only indicated by "->send_max=0 && !pipe". Once
we fix this, we discover that the flag is not used anymore. So the
flags has been renamed BF_OUT_EMPTY and means exactly the condition
above, ie, there is nothing to send.

Doing so has allowed us to remove some unused tests for emptiness,
but also to uncover a certain amount of situations where the flag
was not correctly set or tested.
include/proto/buffers.h
include/types/buffers.h
src/buffers.c
src/session.c
src/stream_sock.c