]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: checks: use an enum instead of flags to report a check result
authorWilly Tarreau <w@1wt.eu>
Wed, 11 Dec 2013 16:09:34 +0000 (17:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 14 Dec 2013 15:02:19 +0000 (16:02 +0100)
commit6aaa1b87cfce4a5bf03b5f235fdb18a89baa37ca
treecae38859ebcad4040ff1e1e3369b4b424f0cc585
parent8e85ad5211849026c86ddcb32701eeb3035eb526
MINOR: checks: use an enum instead of flags to report a check result

We used to have up to 4 sets of flags which were almost all exclusive
to report a check result. And the names were inherited from the old
server states, adding to the confusion. Let's replace that with an
enum handling only the possible combinations :

   SRV_CHK_UNKNOWN                   => CHK_RES_UNKNOWN
   SRV_CHK_FAILED                    => CHK_RES_FAILED
   SRV_CHK_PASSED                    => CHK_RES_PASSED
   SRV_CHK_PASSED | SRV_CHK_DISABLE  => CHK_RES_CONDPASS
include/types/checks.h
src/checks.c