]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: acl/pattern: use types different from int to clarify who does what.
authorWilly Tarreau <w@1wt.eu>
Thu, 28 Nov 2013 21:21:02 +0000 (22:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 2 Dec 2013 22:31:33 +0000 (23:31 +0100)
commit0cba607400ea8892265cd5f1700f39ec160fe0bb
treea7a4bf72d045d84b13c15835a3b41b2c9c39ccfd
parenta65b343eee64d699b95864237bb3b9d0946066e4
MINOR: acl/pattern: use types different from int to clarify who does what.

We now have the following enums and all related functions return them and
consume them :

   enum pat_match_res {
PAT_NOMATCH = 0,         /* sample didn't match any pattern */
PAT_MATCH = 3,           /* sample matched at least one pattern */
   };

   enum acl_test_res {
ACL_TEST_FAIL = 0,           /* test failed */
ACL_TEST_MISS = 1,           /* test may pass with more info */
ACL_TEST_PASS = 3,           /* test passed */
   };

   enum acl_cond_pol {
ACL_COND_NONE, /* no polarity set yet */
ACL_COND_IF, /* positive condition (after 'if') */
ACL_COND_UNLESS, /* negative condition (after 'unless') */
   };

It's just in order to avoid doubts when reading some code.
include/proto/acl.h
include/proto/auth.h
include/proto/pattern.h
include/types/acl.h
include/types/pattern.h
src/acl.c
src/auth.c
src/pattern.c
src/proto_http.c
src/proto_tcp.c