]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tcp: increase the opaque data array
authorThierry FOURNIER <tfournier@arpalert.org>
Wed, 3 Jun 2015 17:32:04 +0000 (19:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 13 Jun 2015 21:01:37 +0000 (23:01 +0200)
This patch increase the opaque data array for the tcp_rules.
It is used by the "store" action (next commited) which deal
with variables.

include/types/proto_tcp.h
src/hlua.c

index f41933b5b09da30f5fd4a32c3bef016c733d5447..a6af2d37ef94a77558f06672b316808736a521d2 100644 (file)
@@ -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;
 };
 
index ab4a5e7da68a4e6ee5382f959c84efbe100c6c54..7919ce0e0983dfa84ebee26bf6725637a8e16336 100644 (file)
@@ -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;