]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: move init_default_instance() to proxy.c and pass it the defproxy pointer
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Feb 2021 07:19:01 +0000 (08:19 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Feb 2021 15:23:46 +0000 (16:23 +0100)
commit144289b4596657dc3cd73d82a909ac8c1dcc578d
tree81e4c5fca1a4ec8658345208ea6664ed8db2289d
parent168a414037c8829be4397937a72ff9f8af3f3d1c
REORG: move init_default_instance() to proxy.c and pass it the defproxy pointer

init_default_instance() was still left in cfgparse.c which is not the
best place to pre-initialize a proxy. Let's place it in proxy.c just
after init_new_proxy(), take this opportunity for renaming it to
proxy_preset_defaults() and taking out init_new_proxy() from it, and
let's pass it the pointer to the default proxy to be initialized instead
of implicitly assuming defproxy. We'll soon be able to exploit this.
Only two call places had to be updated.
include/haproxy/cfgparse.h
include/haproxy/proxy.h
src/cfgparse-listen.c
src/cfgparse.c
src/haproxy.c
src/proxy.c
src/server.c