]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stream-int: use bit fields to match multiple stream-int states at once
authorWilly Tarreau <w@1wt.eu>
Wed, 5 Jun 2019 12:45:06 +0000 (14:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 Jun 2019 14:36:19 +0000 (16:36 +0200)
commitbedcd698b341c91afc0c94ce7cd9bcd9e9e8a201
tree3b82c17b8fcb6041672432df073c8102e73cd311
parent19ecf71b60f34801c11d6006dc2d88262ecd86ea
MINOR: stream-int: use bit fields to match multiple stream-int states at once

At some places we do check for ranges of stream-int states but those
are confusing as states ordering is not well known (e.g. it's not obvious
that CER is between CON and EST). Let's create a bit field from states so
that we can match multiple states at once instead. The new enum si_state_bit
contains SI_SB_* which are state bits instead of state values. The function
si_state_in() indicates if the state in argument is one of those represented
by the bit mask in second argument.
include/proto/stream_interface.h
include/types/stream_interface.h