Move 'serverMode' flag from server.c to log.c

Because log.c and conf.c now depend on serverMode
This commit is contained in:
Andrew Bettison 2013-03-18 15:34:33 +10:30
parent edd245fa81
commit a5d3c16928
4 changed files with 3 additions and 2 deletions

1
log.c
View File

@ -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;

2
log.h
View File

@ -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();

View File

@ -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;

View File

@ -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;