MINOR: actions: Remove the data opaque pointer
This patch removes the "data" opaque pointer and replace it by the generic
opaque pointer "p[0]".
diff --git a/include/types/action.h b/include/types/action.h
index b6c3afb..3333fb0 100644
--- a/include/types/action.h
+++ b/include/types/action.h
@@ -51,7 +51,6 @@
int loglevel; /* log-level value for HTTP_REQ_ACT_SET_LOGL */
int tos; /* tos value for HTTP_REQ_ACT_SET_TOS */
int mark; /* nfmark value for HTTP_REQ_ACT_SET_MARK */
- void *data; /* generic pointer for module or external rule */
struct {
char *ref; /* MAP or ACL file name to update */
struct list key; /* pattern to retrieve MAP or ACL key */
diff --git a/src/hlua.c b/src/hlua.c
index 994e48b..26890c2 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -4382,7 +4382,7 @@
int hlua_tcp_req_act_wrapper(struct act_rule *act_rule, struct proxy *px,
struct session *sess, struct stream *s)
{
- return hlua_request_act_wrapper((struct hlua_rule *)act_rule->arg.data,
+ return hlua_request_act_wrapper((struct hlua_rule *)act_rule->arg.act.p[0],
px, s, AN_REQ_INSPECT_FE);
}
@@ -4392,7 +4392,7 @@
int hlua_tcp_res_act_wrapper(struct act_rule *act_rule, struct proxy *px,
struct session *sess, struct stream *s)
{
- return hlua_request_act_wrapper((struct hlua_rule *)act_rule->arg.data,
+ return hlua_request_act_wrapper((struct hlua_rule *)act_rule->arg.act.p[0],
px, s, AN_RES_INSPECT);
}
@@ -4403,7 +4403,7 @@
int hlua_http_req_act_wrapper(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s)
{
- return hlua_request_act_wrapper((struct hlua_rule *)rule->arg.data, px,
+ return hlua_request_act_wrapper((struct hlua_rule *)rule->arg.act.p[0], px,
s, AN_REQ_HTTP_PROCESS_FE);
}
@@ -4414,7 +4414,7 @@
int hlua_http_res_act_wrapper(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s)
{
- return hlua_request_act_wrapper((struct hlua_rule *)rule->arg.data, px,
+ return hlua_request_act_wrapper((struct hlua_rule *)rule->arg.act.p[0], px,
s, AN_RES_HTTP_PROCESS_BE);
}
@@ -4422,7 +4422,7 @@
static int tcp_req_action_register_lua(const char **args, int *cur_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
- if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->arg.data, err))
+ if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->arg.act.p[0], err))
return 0;
rule->action = TCP_ACT_CUSTOM_CONT;
rule->action_ptr = hlua_tcp_req_act_wrapper;
@@ -4433,7 +4433,7 @@
static int tcp_res_action_register_lua(const char **args, int *cur_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
- if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->arg.data, err))
+ if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->arg.act.p[0], err))
return 0;
rule->action = TCP_ACT_CUSTOM_CONT;
rule->action_ptr = hlua_tcp_res_act_wrapper;
@@ -4444,7 +4444,7 @@
static int http_req_action_register_lua(const char **args, int *cur_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
- if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->arg.data, err))
+ if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->arg.act.p[0], err))
return -1;
rule->action = HTTP_REQ_ACT_CUSTOM_CONT;
rule->action_ptr = hlua_http_req_act_wrapper;
@@ -4455,7 +4455,7 @@
static int http_res_action_register_lua(const char **args, int *cur_arg, struct proxy *px,
struct act_rule *rule, char **err)
{
- if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->arg.data, err))
+ if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->arg.act.p[0], err))
return -1;
rule->action = HTTP_RES_ACT_CUSTOM_CONT;
rule->action_ptr = hlua_http_res_act_wrapper;