mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 13:51:26 +02:00
CLEANUP: vars: move the per-process variables initialization to vars.c
There's no point keeping the vars_init_head() call in init() when we already have a vars_init() registered at the right time to do that, and it complexifies the boot sequence, so let's move it there.
This commit is contained in:
parent
add4306231
commit
cc0d554e5f
@ -1540,9 +1540,6 @@ static void init(int argc, char **argv)
|
|||||||
/* Initialise lua. */
|
/* Initialise lua. */
|
||||||
hlua_init();
|
hlua_init();
|
||||||
|
|
||||||
/* Initialize process vars */
|
|
||||||
vars_init_head(&proc_vars, SCOPE_PROC);
|
|
||||||
|
|
||||||
global.tune.options |= GTUNE_USE_SELECT; /* select() is always available */
|
global.tune.options |= GTUNE_USE_SELECT; /* select() is always available */
|
||||||
#if defined(USE_POLL)
|
#if defined(USE_POLL)
|
||||||
global.tune.options |= GTUNE_USE_POLL;
|
global.tune.options |= GTUNE_USE_POLL;
|
||||||
|
@ -1335,6 +1335,8 @@ static int vars_max_size_check(char **args, int section_type, struct proxy *curp
|
|||||||
static void vars_init()
|
static void vars_init()
|
||||||
{
|
{
|
||||||
var_name_hash_seed = ha_random64();
|
var_name_hash_seed = ha_random64();
|
||||||
|
/* Initialize process vars */
|
||||||
|
vars_init_head(&proc_vars, SCOPE_PROC);
|
||||||
}
|
}
|
||||||
|
|
||||||
INITCALL0(STG_PREPARE, vars_init);
|
INITCALL0(STG_PREPARE, vars_init);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user