mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-28 15:42:30 +00:00
MINOR: server: Add a dictionary for server names.
This patch only declares and defines a dictionary for the server names (stored as ->id member field).
This commit is contained in:
parent
84d6046a33
commit
7da71293e4
@ -175,6 +175,9 @@ enum srv_initaddr {
|
||||
#define SRV_SSL_O_EARLY_DATA 0x400 /* Allow using early data */
|
||||
#endif
|
||||
|
||||
/* The server names dictionary */
|
||||
extern struct dict server_name_dict;
|
||||
|
||||
struct pid_list {
|
||||
struct list list;
|
||||
pid_t pid;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <types/applet.h>
|
||||
#include <types/cli.h>
|
||||
#include <types/dict.h>
|
||||
#include <types/global.h>
|
||||
#include <types/cli.h>
|
||||
#include <types/dns.h>
|
||||
@ -62,6 +63,12 @@ struct task *idle_conn_task = NULL;
|
||||
struct task *idle_conn_cleanup[MAX_THREADS] = { NULL };
|
||||
struct list toremove_connections[MAX_THREADS];
|
||||
|
||||
/* The server names dictionary */
|
||||
struct dict server_name_dict = {
|
||||
.name = "server names",
|
||||
.values = EB_ROOT_UNIQUE,
|
||||
};
|
||||
|
||||
int srv_downtime(const struct server *s)
|
||||
{
|
||||
if ((s->cur_state != SRV_ST_STOPPED) && s->last_change < now.tv_sec) // ignore negative time
|
||||
|
Loading…
Reference in New Issue
Block a user