unsigned char lr[HANA_OBS_SIZE]; /* result for l4/l7: 0 = ignore, 1 - error, 2 - OK */
};
-/* bits for tcpcheck_rule->action */
+/* possible actions for tcpcheck_rule->action */
enum {
- TCPCHK_ACT_SEND = 1, /* send action, regular string format */
+ TCPCHK_ACT_SEND = 0, /* send action, regular string format */
TCPCHK_ACT_EXPECT, /* expect action, either regular or binary string */
};
if (&cur->list == head)
break;
- if (check->current_step->action & TCPCHK_ACT_SEND) {
+ if (check->current_step->action == TCPCHK_ACT_SEND) {
/* reset the read buffer */
if (*check->bi->data != '\0') {
*check->bi->data = '\0';
cur = (struct tcpcheck_rule *)cur->list.n;
check->current_step = cur;
} /* end 'send' */
- else if (check->current_step->action & TCPCHK_ACT_EXPECT) {
+ else if (check->current_step->action == TCPCHK_ACT_EXPECT) {
if (unlikely(check->result & SRV_CHK_FAILED))
goto out_end_tcpcheck;
else {
cur = (struct tcpcheck_rule*)cur->list.n;
check->current_step = cur;
- if (check->current_step->action & TCPCHK_ACT_EXPECT)
+ if (check->current_step->action == TCPCHK_ACT_EXPECT)
goto tcpcheck_expect;
__conn_data_stop_recv(conn);
}
if (cur->inverse) {
cur = (struct tcpcheck_rule*)cur->list.n;
check->current_step = cur;
- if (check->current_step->action & TCPCHK_ACT_EXPECT)
+ if (check->current_step->action == TCPCHK_ACT_EXPECT)
goto tcpcheck_expect;
__conn_data_stop_recv(conn);
}