MEDIUM: actions: Normalize the return code of the configuration parsers
This patch normalize the return code of the configuration parsers. Before
these changes, the tcp action parser returned -1 if fail and 0 for the
succes. The http action returned 0 if fail and 1 if succes.
The normalisation does:
- ACT_RET_PRS_OK for succes
- ACT_RET_PRS_ERR for failure
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 87aeaf0..2588ac9 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -1465,7 +1465,7 @@
if (kw) {
arg++;
rule->from = ACT_F_TCP_RES_CNT;
- if (!kw->parse((const char **)args, &arg, curpx, rule, err))
+ if (kw->parse((const char **)args, &arg, curpx, rule, err) == ACT_RET_PRS_ERR)
return -1;
} else {
memprintf(err,
@@ -1673,7 +1673,7 @@
}
if (kw) {
arg++;
- if (!kw->parse((const char **)args, &arg, curpx, rule, err))
+ if (kw->parse((const char **)args, &arg, curpx, rule, err) == ACT_RET_PRS_ERR)
return -1;
} else {
memprintf(err,