MEDIUM: vars: move the session variables to the session, not the stream
It's important that the session-wide variables are in the session and not
in the stream.
diff --git a/include/proto/vars.h b/include/proto/vars.h
index e1092c7..4c85825 100644
--- a/include/proto/vars.h
+++ b/include/proto/vars.h
@@ -5,6 +5,7 @@
void vars_init(struct vars *vars, enum vars_scope scope);
void vars_prune(struct vars *vars, struct stream *strm);
+void vars_prune_per_sess(struct vars *vars);
int vars_get_by_name(const char *name, size_t len, struct stream *strm, struct sample *smp);
void vars_set_by_name(const char *name, size_t len, struct stream *strm, struct sample *smp);
int vars_check_arg(struct arg *arg, char **err);
diff --git a/include/types/session.h b/include/types/session.h
index d02e57f..62c3a95 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -35,6 +35,7 @@
#include <types/proxy.h>
#include <types/stick_table.h>
#include <types/task.h>
+#include <types/vars.h>
struct session {
struct proxy *fe; /* the proxy this session depends on for the client side */
@@ -43,6 +44,7 @@
struct timeval accept_date; /* date of the session's accept() in user date */
struct timeval tv_accept; /* date of the session's accept() in internal date (monotonic) */
struct stkctr stkctr[MAX_SESS_STKCTR]; /* stick counters for tcp-connection */
+ struct vars vars; /* list of variables for the session scope. */
};
#endif /* _TYPES_SESSION_H */