From: Thierry FOURNIER Date: Wed, 3 Jun 2015 17:32:04 +0000 (+0200) Subject: MINOR: tcp: increase the opaque data array X-Git-Tag: v1.6-dev2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbdb77582d390910be8c9fc2ba9bb7ecdd1852c5;p=thirdparty%2Fhaproxy.git MINOR: tcp: increase the opaque data array This patch increase the opaque data array for the tcp_rules. It is used by the "store" action (next commited) which deal with variables. --- diff --git a/include/types/proto_tcp.h b/include/types/proto_tcp.h index f41933b5b0..a6af2d37ef 100644 --- a/include/types/proto_tcp.h +++ b/include/types/proto_tcp.h @@ -57,7 +57,7 @@ struct tcp_rule { union { struct track_ctr_prm trk_ctr; struct capture_prm cap; - void *data; + void *data[4]; } act_prm; }; diff --git a/src/hlua.c b/src/hlua.c index ab4a5e7da6..7919ce0e09 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -4349,7 +4349,7 @@ static int hlua_request_act_wrapper(struct hlua_rule *rule, struct proxy *px, int hlua_tcp_req_act_wrapper(struct tcp_rule *tcp_rule, struct proxy *px, struct stream *s) { - return hlua_request_act_wrapper((struct hlua_rule *)tcp_rule->act_prm.data, + return hlua_request_act_wrapper((struct hlua_rule *)tcp_rule->act_prm.data[0], px, s, AN_REQ_INSPECT_FE); } @@ -4359,7 +4359,7 @@ int hlua_tcp_req_act_wrapper(struct tcp_rule *tcp_rule, struct proxy *px, int hlua_tcp_res_act_wrapper(struct tcp_rule *tcp_rule, struct proxy *px, struct stream *s) { - return hlua_request_act_wrapper((struct hlua_rule *)tcp_rule->act_prm.data, + return hlua_request_act_wrapper((struct hlua_rule *)tcp_rule->act_prm.data[0], px, s, AN_RES_INSPECT); } @@ -4389,7 +4389,7 @@ int hlua_http_res_act_wrapper(struct http_res_rule *rule, struct proxy *px, static int tcp_req_action_register_lua(const char **args, int *cur_arg, struct proxy *px, struct tcp_rule *rule, char **err) { - if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->act_prm.data, err)) + if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->act_prm.data[0], err)) return 0; rule->action = TCP_ACT_CUSTOM_CONT; rule->action_ptr = hlua_tcp_req_act_wrapper; @@ -4400,7 +4400,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 tcp_rule *rule, char **err) { - if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->act_prm.data, err)) + if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->act_prm.data[0], err)) return 0; rule->action = TCP_ACT_CUSTOM_CONT; rule->action_ptr = hlua_tcp_res_act_wrapper;