]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: mworker: declare master variable in global.h
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 27 Nov 2018 11:02:38 +0000 (12:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 27 Nov 2018 18:34:00 +0000 (19:34 +0100)
This variable is used at several places, better declare it in global.h.

include/types/global.h
src/cli.c
src/listener.c

index 74ebf14e96045637ae43712348caf7496e2dffbc..0d1c4e2e71825127078779f29b9511a00800a04f 100644 (file)
@@ -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
index b8b233509a48f33fbfba255ead7ba9ca9991ac2b..43dc8b3a9be5b9c9f7cfc7080a13093df5aa25af 100644 (file)
--- 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)
index 4bcf2d8ac7b10d73d2f27b49e03b673be598649c..c75f8ef719ec680a4ff151198799900c7313f7d7 100644 (file)
@@ -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