MINOR: proto_http: use an "expr" type in place of generic opaque type.
This patch removes the generic opaque type for storing the configuration of the
acion "set-src" (HTTP_REQ_ACT_SET_SRC), and use the dedicated type "struct expr"
diff --git a/include/types/action.h b/include/types/action.h
index dcb75d2..436c7fb 100644
--- a/include/types/action.h
+++ b/include/types/action.h
@@ -56,6 +56,7 @@
struct list key; /* pattern to retrieve MAP or ACL key */
struct list value; /* pattern to retrieve MAP value */
} map;
+ struct sample_expr *expr;
struct hlua_rule *hlua_rule;
struct {
struct sample_expr *expr;
diff --git a/src/proto_http.c b/src/proto_http.c
index 123d371..bc116d6 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -3679,7 +3679,7 @@
if ((cli_conn = objt_conn(sess->origin)) && conn_ctrl_ready(cli_conn)) {
struct sample *smp;
- smp = sample_fetch_as_type(px, sess, s, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, rule->arg.act.p[0], SMP_T_ADDR);
+ smp = sample_fetch_as_type(px, sess, s, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, rule->arg.expr, SMP_T_ADDR);
if (smp) {
if (smp->data.type == SMP_T_IPV4) {
@@ -9345,7 +9345,7 @@
goto out_err;
}
- rule->arg.act.p[0] = expr;
+ rule->arg.expr = expr;
rule->action = HTTP_REQ_ACT_SET_SRC;
} else if (((custom = action_http_req_custom(args[0])) != NULL)) {
char *errmsg = NULL;