signed char use_ssl; /* ssl enabled (1: on, 0: disabled, -1 forced off) */
unsigned int flags; /* server flags (SRV_F_*) */
unsigned int pp_opts; /* proxy protocol options (SRV_PP_*) */
- struct list global_list; /* attach point in the global servers */
struct list el_px; /* attach point in parent proxy */
+ struct list el_alt; /* extra attach point for several usages
+ * - for <servers_to_init> global list during parsing
+ */
int cklen; /* the len of the cookie, to speed up checks */
int rdr_len; /* the length of the redirection prefix */
char *cookie; /* the id set in the cookie */
extern struct idle_conns idle_conns[MAX_THREADS];
extern struct task *idle_conn_task[MAX_THREADS];
extern struct eb_root idle_conn_srv[MAX_THREADS];
-extern struct list all_servers;
+extern struct list servers_to_init;
extern struct dict server_key_dict;
int srv_downtime(const struct server *s);
if (global.mode & MODE_STARTING) {
/* Necessary if startup is interrupted due to an early error before check_config_validity(). */
- LIST_DEL_INIT(&srv->global_list);
+ LIST_DEL_INIT(&srv->el_alt);
}
/* Reset the proxy's ready_srv if it was this one. */
* we must finish to initialize certain things on the servers,
* as some of the fields may be accessed soon
*/
- list_for_each_entry_safe(newsrv, tmpsrv, &all_servers, global_list) {
+ list_for_each_entry_safe(newsrv, tmpsrv, &servers_to_init, el_alt) {
err_code |= srv_preinit(newsrv);
if (err_code & ERR_CODE)
goto out;
- LIST_DEL_INIT(&newsrv->global_list);
+ LIST_DEL_INIT(&newsrv->el_alt);
}
list_for_each_entry(defpx, &defaults_list, el) {
if (srv_preinit(srv))
goto leave;
- /* No need to stay in <all_servers> as srv_preinit() is manually called. */
- LIST_DEL_INIT(&srv->global_list);
+ /* No need to stay in <servers_to_init> as srv_preinit() is manually called. */
+ LIST_DEL_INIT(&srv->el_alt);
#if 0
/* XXX Must this be done? XXX */
struct eb_root idle_conn_srv[MAX_THREADS];
struct task *idle_conn_task[MAX_THREADS] __read_mostly = {};
-struct list all_servers = LIST_HEAD_INIT(all_servers);
+struct list servers_to_init = LIST_HEAD_INIT(servers_to_init);
static struct task *server_atomic_sync_task = NULL;
static event_hdl_async_equeue server_atomic_sync_queue;
HA_RWLOCK_INIT(&srv->path_params.param_lock);
- LIST_INIT(&srv->global_list);
+ LIST_INIT(&srv->el_alt);
if (global.mode & MODE_STARTING)
- LIST_APPEND(&all_servers, &srv->global_list);
+ LIST_APPEND(&servers_to_init, &srv->el_alt);
return srv;
}
if (srv_preinit(srv) & ERR_CODE)
goto error;
- /* No need to stay in <all_servers> as srv_preinit() is manually called. */
- LIST_DEL_INIT(&srv->global_list);
+ /* No need to stay in <servers_to_init> as srv_preinit() is manually called. */
+ LIST_DEL_INIT(&srv->el_alt);
/* Same thing for the forward proxy: check_config_validity() has
* already walked over sink_proxies_list, so this one is never