From a5d3c16928f33a5c4be71edf5fa65622cddfb235 Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Mon, 18 Mar 2013 15:34:33 +1030 Subject: [PATCH] Move 'serverMode' flag from server.c to log.c Because log.c and conf.c now depend on serverMode --- log.c | 1 + log.h | 2 ++ serval.h | 1 - server.c | 1 - 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/log.c b/log.c index bbc08ed3..bf776265 100644 --- a/log.c +++ b/log.c @@ -42,6 +42,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "strbuf.h" #include "strbuf_helpers.h" +int serverMode = 0; const struct __sourceloc __whence = __NOWHERE__; static FILE *logfile = NULL; diff --git a/log.h b/log.h index ce238096..f8c02167 100644 --- a/log.h +++ b/log.h @@ -84,6 +84,8 @@ struct __sourceloc { extern const struct __sourceloc __whence; // see above +extern int serverMode; + void set_logging(FILE *f); FILE *open_logging(); void close_logging(); diff --git a/serval.h b/serval.h index 7589f7c5..35f4d524 100644 --- a/serval.h +++ b/serval.h @@ -170,7 +170,6 @@ void serval_setinstancepath(const char *instancepath); #define SERVER_CONFIG_RELOAD_INTERVAL_MS 1000 -extern int serverMode; extern int servalShutdown; extern char *gatewayspec; diff --git a/server.c b/server.c index db56cfd0..1171bae8 100644 --- a/server.c +++ b/server.c @@ -36,7 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. char *exec_args[EXEC_NARGS + 1]; int exec_argc = 0; -int serverMode=0; int servalShutdown = 0; static int server_getpid = 0;