mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-15 07:54:33 +00:00
MINOR: actions: Remove the data opaque pointer
This patch removes the "data" opaque pointer and replace it by the generic opaque pointer "p[0]".
This commit is contained in:
parent
a28a9429b2
commit
7677f400f5
@ -51,7 +51,6 @@ struct act_rule {
|
||||
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 */
|
||||
|
16
src/hlua.c
16
src/hlua.c
@ -4382,7 +4382,7 @@ static int hlua_request_act_wrapper(struct hlua_rule *rule, struct proxy *px,
|
||||
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_req_act_wrapper(struct act_rule *act_rule, struct proxy *px,
|
||||
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_tcp_res_act_wrapper(struct act_rule *act_rule, struct proxy *px,
|
||||
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_req_act_wrapper(struct act_rule *rule, struct proxy *px,
|
||||
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 @@ int hlua_http_res_act_wrapper(struct act_rule *rule, struct proxy *px,
|
||||
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_req_action_register_lua(const char **args, int *cur_arg, struct p
|
||||
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 tcp_res_action_register_lua(const char **args, int *cur_arg, struct p
|
||||
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_req_action_register_lua(const char **args, int *cur_arg, struct
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user