On Sat, 20 Oct 2007, Willy Tarreau wrote:
<CUT>
> I agree with your table, but the "if" becomes hard to understand IMHO.
> I wouldn't like to read it at 3am. I'd rather use something like this :
>
> if (!((x == PR_CAP_FE && y == PR_CAP_BE) ||
> (x == PR_CAP_BE && y == PR_CAP_FE)))
>
> Basically, it explicitly catches all cases where the two entries are
> not exactly one FE and one BE, with both being different. Also, since
> we've been discussing it, it would be good to add a good comment around
> the test.
Right, I will cook a patch that explicitly matches FE and BE. Anyway, comparing "x == PR_CAP_FE" is still not enough as frontend is defined as "PR_CAP_FE | PR_CAP_RS", similar for backend.
Best regards,
Krzysztof Olędzki Received on 2007/10/20 15:44
This archive was generated by hypermail 2.2.0 : 2007/11/04 19:21 CET