]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stconn: add sc_is_recv_allowed() to check for ability to receive
authorWilly Tarreau <w@1wt.eu>
Wed, 25 May 2022 13:00:44 +0000 (15:00 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 17:33:35 +0000 (19:33 +0200)
commit13d63afacd6e14dd5f5b698a00c81bea59c50f14
tree5ee5a302abc6e5592e3940dc10dee97bf62dbf67
parent4164eb94f345664c10c4ea5e8a9adb352e8c7c29
MINOR: stconn: add sc_is_recv_allowed() to check for ability to receive

At plenty of places we combine multiple flags checks to determine if we
can receive (endp_ready, rx_blocked, cf_shutr etc). Let's group them
under a single function that is meant to replace existing tests.

Some tests were only checking the rxblk flags at the connection level,
so for now they were not converted, this requires a bit of auditing
first, and probably a test to determine whether or not to check for
cf_shutr (e.g. there is none if no stream is present).
include/haproxy/cs_utils.h
src/conn_stream.c
src/stream.c