MEDIUM: capture: Move the capture configuration storage in the union
This patch moves the capture configuration struct (capture_prm) in the main
"arg" union. This reduce the size of the struct.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index e95ca8c..42f5619 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -1205,11 +1205,11 @@
}
else if (rule->action == TCP_ACT_CAPTURE) {
struct sample *key;
- struct cap_hdr *h = rule->act_prm.cap.hdr;
+ struct cap_hdr *h = rule->arg.cap.hdr;
char **cap = s->req_cap;
int len;
- key = sample_fetch_as_type(s->be, sess, s, SMP_OPT_DIR_REQ | partial, rule->act_prm.cap.expr, SMP_T_STR);
+ key = sample_fetch_as_type(s->be, sess, s, SMP_OPT_DIR_REQ | partial, rule->arg.cap.expr, SMP_T_STR);
if (!key)
continue;
@@ -1615,8 +1615,8 @@
/* check if we need to allocate an hdr_idx struct for HTTP parsing */
curpx->http_needed |= !!(expr->fetch->use & SMP_USE_HTTP_ANY);
- rule->act_prm.cap.expr = expr;
- rule->act_prm.cap.hdr = hdr;
+ rule->arg.cap.expr = expr;
+ rule->arg.cap.hdr = hdr;
rule->action = TCP_ACT_CAPTURE;
}
else if (strncmp(args[arg], "track-sc", 8) == 0 &&