]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: channel: remove the BF_OUT_EMPTY flag
authorWilly Tarreau <wtarreau@exceliance.fr>
Fri, 24 Aug 2012 20:40:29 +0000 (22:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 3 Sep 2012 18:47:32 +0000 (20:47 +0200)
commit8e21bb9e52edcf72fb466fcce856adbb72a40fb1
treeb1b72b21cc89724caea345a8a320b9f7b680c84f
parentc7e4238df0fb7e824c15792ddea7f4da1aa80063
MAJOR: channel: remove the BF_OUT_EMPTY flag

This flag was very problematic because it was composite in that both changes
to the pipe or to the buffer had to cause this flag to be updated, which is
not always simple (eg: there may not even be a channel attached to a buffer
at all).

There were not that many users of this flags, mostly setters. So the flag got
replaced with a macro which reports whether the channel is empty or not, by
checking both the pipe and the buffer.

One part of the change is sensible : the flag was also part of BF_MASK_STATIC,
which is used by process_session() to rescan all analysers in case the flag's
status changes. At first glance, none of the analysers seems to change its
mind base on this flag when it is subject to change, so it seems fine not to
add variation checks here. Otherwise it's possible that checking the buffer's
output size is more useful than checking the flag's replacement.
include/proto/channel.h
include/types/channel.h
src/channel.c
src/proto_http.c
src/proto_tcp.c
src/session.c
src/stream_interface.c