]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: actions: Remove the data opaque pointer
authorThierry FOURNIER <tfournier@arpalert.org>
Thu, 30 Jul 2015 16:53:54 +0000 (18:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 20 Aug 2015 15:13:46 +0000 (17:13 +0200)
This patch removes the "data" opaque pointer and replace it by the generic
opaque pointer "p[0]".

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

index b6c3afb312c2233ab886a49e452b96adf87ae9b3..3333fb0be41caa09751c9b636270236088844fce 100644 (file)
@@ -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 */
index 994e48b141b30641e0a20e23ed67331b068280e8..26890c2d5eb32a4d7cc360037c0a4f3f7bfeddfb 100644 (file)
@@ -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;