From 4b58c80ee20eb8b460f65d6e8b7b73f037df7766 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Tue, 27 Nov 2018 12:02:38 +0100 Subject: [PATCH] REORG: mworker: declare master variable in global.h This variable is used at several places, better declare it in global.h. --- include/types/global.h | 1 + src/cli.c | 2 -- src/listener.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/types/global.h b/include/types/global.h index 74ebf14e96..0d1c4e2e71 100644 --- a/include/types/global.h +++ b/include/types/global.h @@ -219,6 +219,7 @@ extern unsigned int warned; /* bitfield of a few warnings to emit just once extern volatile unsigned long sleeping_thread_mask; extern struct list proc_list; /* list of process in mworker mode */ extern struct mworker_proc *proc_self; /* process structure of current process */ +extern int master; /* 1 if in master, 0 otherwise */ /* bit values to go with "warned" above */ #define WARN_BLOCK_DEPRECATED 0x00000001 diff --git a/src/cli.c b/src/cli.c index b8b233509a..43dc8b3a9b 100644 --- a/src/cli.c +++ b/src/cli.c @@ -95,8 +95,6 @@ static struct cli_kw_list cli_keywords = { extern const char *stat_status_codes[]; -extern int master; - static struct proxy *mworker_proxy; /* CLI proxy of the master */ static char *cli_gen_usage_msg(struct appctx *appctx) diff --git a/src/listener.c b/src/listener.c index 4bcf2d8ac7..c75f8ef719 100644 --- a/src/listener.c +++ b/src/listener.c @@ -50,8 +50,6 @@ static struct bind_kw_list bind_keywords = { .list = LIST_HEAD_INIT(bind_keywords.list) }; -extern int master; - struct xfer_sock_list *xfer_sock_list = NULL; /* This function adds the specified listener's file descriptor to the polling