MEDIUM: actions: Merge (http|tcp)-(request|reponse) keywords structs
This patch merges the conguration keyword struct. Each declared configuration
keyword struct are similar with the others. This patch simplify the code.
diff --git a/include/proto/proto_http.h b/include/proto/proto_http.h
index a3a261f..0ebc612 100644
--- a/include/proto/proto_http.h
+++ b/include/proto/proto_http.h
@@ -129,16 +129,16 @@
enum http_meth_t find_http_meth(const char *str, const int len);
-struct http_req_action_kw *action_http_req_custom(const char *kw);
-struct http_res_action_kw *action_http_res_custom(const char *kw);
+struct action_kw *action_http_req_custom(const char *kw);
+struct action_kw *action_http_res_custom(const char *kw);
int val_hdr(struct arg *arg, char **err_msg);
-static inline void http_req_keywords_register(struct http_req_action_kw_list *kw_list)
+static inline void http_req_keywords_register(struct action_kw_list *kw_list)
{
LIST_ADDQ(&http_req_keywords.list, &kw_list->list);
}
-static inline void http_res_keywords_register(struct http_res_action_kw_list *kw_list)
+static inline void http_res_keywords_register(struct action_kw_list *kw_list)
{
LIST_ADDQ(&http_res_keywords.list, &kw_list->list);
}
diff --git a/include/proto/proto_tcp.h b/include/proto/proto_tcp.h
index 3127625..5f589ea 100644
--- a/include/proto/proto_tcp.h
+++ b/include/proto/proto_tcp.h
@@ -41,9 +41,9 @@
int tcp_exec_req_rules(struct session *sess);
/* TCP keywords. */
-void tcp_req_conn_keywords_register(struct tcp_action_kw_list *kw_list);
-void tcp_req_cont_keywords_register(struct tcp_action_kw_list *kw_list);
-void tcp_res_cont_keywords_register(struct tcp_action_kw_list *kw_list);
+void tcp_req_conn_keywords_register(struct action_kw_list *kw_list);
+void tcp_req_cont_keywords_register(struct action_kw_list *kw_list);
+void tcp_res_cont_keywords_register(struct action_kw_list *kw_list);
/* Export some samples. */
int smp_fetch_src(const struct arg *args, struct sample *smp, const char *kw, void *private);