]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: vars: make vars_get_by_* support an optional default value
authorWilly Tarreau <w@1wt.eu>
Fri, 3 Sep 2021 09:52:38 +0000 (11:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Sep 2021 10:08:54 +0000 (12:08 +0200)
commite352b9dac744da99076b9dc1534825298bc0428a
treeecab5c305826ae3087a07691151dd504c48b1368
parentbe7e00d1343fa8353e47b16cfad08852347e7870
MINOR: vars: make vars_get_by_* support an optional default value

In preparation for support default values when fetching variables, we
need to update the internal API to pass an extra argument to functions
vars_get_by_{name,desc} to provide an optional default value. This
patch does this and always passes NULL in this argument. var_to_smp()
was extended to fall back to this value when available.
include/haproxy/vars.h
src/hlua.c
src/sample.c
src/vars.c