mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: vars: make get_vars() allow the session to be null
In order to support manipulating variables from outside a session, let's make get_vars() not assume that the session is always set.
This commit is contained in:
parent
704ba1d63e
commit
a07d61be4c
@ -47,7 +47,7 @@ static inline struct vars *get_vars(struct session *sess, struct stream *strm, e
|
||||
case SCOPE_PROC:
|
||||
return &global.vars;
|
||||
case SCOPE_SESS:
|
||||
return &sess->vars;
|
||||
return sess ? &sess->vars : NULL;
|
||||
case SCOPE_CHECK: {
|
||||
struct check *check = objt_check(sess->origin);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user