mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-29 08:02:08 +00:00
CLEANUP: server: remove the update list and the update lock
These ones are not more used, let's get rid of them.
This commit is contained in:
parent
3ff577e165
commit
91c2826e1d
@ -353,7 +353,6 @@ enum lock_label {
|
||||
LISTENER_QUEUE_LOCK,
|
||||
PROXY_LOCK,
|
||||
SERVER_LOCK,
|
||||
UPDATED_SERVERS_LOCK,
|
||||
LBPRM_LOCK,
|
||||
SIGNALS_LOCK,
|
||||
STK_TABLE_LOCK,
|
||||
|
@ -50,9 +50,6 @@ void srv_compute_all_admin_states(struct proxy *px);
|
||||
int srv_set_addr_via_libc(struct server *srv, int *err_code);
|
||||
int srv_init_addr(void);
|
||||
struct server *cli_find_server(struct appctx *appctx, char *arg);
|
||||
void servers_update_status(void);
|
||||
|
||||
extern struct list updated_servers;
|
||||
|
||||
/* functions related to server name resolution */
|
||||
int snr_update_srv_status(struct server *s, int has_no_ip);
|
||||
|
@ -311,7 +311,6 @@ struct server {
|
||||
int nb_low;
|
||||
int nb_high;
|
||||
} tmpl_info;
|
||||
struct list update_status; /* to attach to list of servers chnaging status */
|
||||
struct {
|
||||
long duration;
|
||||
short status, code;
|
||||
|
22
src/server.c
22
src/server.c
@ -44,9 +44,6 @@
|
||||
#include <proto/dns.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
struct list updated_servers = LIST_HEAD_INIT(updated_servers);
|
||||
__decl_hathreads(HA_SPINLOCK_T updated_servers_lock);
|
||||
|
||||
static void srv_update_status(struct server *s);
|
||||
static void srv_update_state(struct server *srv, int version, char **params);
|
||||
static int srv_apply_lastaddr(struct server *srv, int *err_code);
|
||||
@ -1618,8 +1615,6 @@ static struct server *new_server(struct proxy *proxy)
|
||||
LIST_INIT(&srv->safe_conns[i]);
|
||||
}
|
||||
|
||||
LIST_INIT(&srv->update_status);
|
||||
|
||||
srv->next_state = SRV_ST_RUNNING; /* early server setup */
|
||||
srv->last_change = now.tv_sec;
|
||||
|
||||
@ -4522,7 +4517,6 @@ static struct cli_kw_list cli_kws = {{ },{
|
||||
__attribute__((constructor))
|
||||
static void __server_init(void)
|
||||
{
|
||||
HA_SPIN_INIT(&updated_servers_lock);
|
||||
cli_register_kw(&cli_kws);
|
||||
}
|
||||
|
||||
@ -5060,22 +5054,6 @@ static void srv_update_status(struct server *s)
|
||||
/* Re-set log strings to empty */
|
||||
*s->adm_st_chg_cause = 0;
|
||||
}
|
||||
/*
|
||||
* This function loops on servers registered for asynchronous
|
||||
* status changes
|
||||
*
|
||||
* NOTE: No needs to lock <updated_servers> list because it is called inside the
|
||||
* sync point.
|
||||
*/
|
||||
void servers_update_status(void) {
|
||||
struct server *s, *stmp;
|
||||
|
||||
list_for_each_entry_safe(s, stmp, &updated_servers, update_status) {
|
||||
srv_update_status(s);
|
||||
LIST_DEL(&s->update_status);
|
||||
LIST_INIT(&s->update_status);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
Loading…
Reference in New Issue
Block a user