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.act.p[0],
- px, s, AN_REQ_INSPECT_FE);
+ return hlua_request_act_wrapper(act_rule->arg.hlua_rule, px, s, AN_REQ_INSPECT_FE);
}
/* Lua execution wrapper for "tcp-response". This function uses
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.act.p[0],
- px, s, AN_RES_INSPECT);
+ return hlua_request_act_wrapper(act_rule->arg.hlua_rule, px, s, AN_RES_INSPECT);
}
/* Lua execution wrapper for http-request.
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.act.p[0], px,
- s, AN_REQ_HTTP_PROCESS_FE);
+ return hlua_request_act_wrapper(rule->arg.hlua_rule, px, s, AN_REQ_HTTP_PROCESS_FE);
}
/* Lua execution wrapper for http-response.
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.act.p[0], px,
- s, AN_RES_HTTP_PROCESS_BE);
+ return hlua_request_act_wrapper(rule->arg.hlua_rule, px, s, AN_RES_HTTP_PROCESS_BE);
}
/* tcp-request <*> configuration wrapper. */
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.act.p[0], err))
+ if (!hlua_parse_rule(args, cur_arg, px, &rule->arg.hlua_rule, err))
return 0;
rule->action = TCP_ACT_CUSTOM_CONT;
rule->action_ptr = hlua_tcp_req_act_wrapper;
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.act.p[0], err))
+ if (!hlua_parse_rule(args, cur_arg, px, &rule->arg.hlua_rule, err))
return 0;
rule->action = TCP_ACT_CUSTOM_CONT;
rule->action_ptr = hlua_tcp_res_act_wrapper;
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.act.p[0], err))
+ if (!hlua_parse_rule(args, cur_arg, px, &rule->arg.hlua_rule, err))
return -1;
rule->action = HTTP_REQ_ACT_CUSTOM_CONT;
rule->action_ptr = hlua_http_req_act_wrapper;
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.act.p[0], err))
+ if (!hlua_parse_rule(args, cur_arg, px, &rule->arg.hlua_rule, err))
return -1;
rule->action = HTTP_RES_ACT_CUSTOM_CONT;
rule->action_ptr = hlua_http_res_act_wrapper;