diff options
Diffstat (limited to 'src/engine/master.cpp')
| -rw-r--r-- | src/engine/master.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/engine/master.cpp b/src/engine/master.cpp index c1d3e20..92d1b97 100644 --- a/src/engine/master.cpp +++ b/src/engine/master.cpp @@ -20,8 +20,6 @@ #define SERVER_LIMIT 4096 #define SERVER_DUP_LIMIT 10 -FILE *logfile = NULL; - struct userinfo { char *name; void *pubkey; @@ -126,15 +124,15 @@ enet_uint32 servtime = 0; void fatal(const char *fmt, ...) { va_list args; va_start(args, fmt); - vfprintf(logfile, fmt, args); - fputc('\n', logfile); + vfprintf(stdout, fmt, args); + fputc('\n', stdout); va_end(args); exit(EXIT_FAILURE); } void conoutfv(int type, const char *fmt, va_list args) { - vfprintf(logfile, fmt, args); - fputc('\n', logfile); + vfprintf(stdout, fmt, args); + fputc('\n', stdout); } void purgeclient(int n) { @@ -570,9 +568,7 @@ int main(int argc, char **argv) { defformatstring(cfgname, "%smaster.cfg", dir); path(logname); path(cfgname); - logfile = fopen(logname, "a"); - if(!logfile) logfile = stdout; - setvbuf(logfile, NULL, _IOLBF, BUFSIZ); + setvbuf(stdout, NULL, _IOLBF, BUFSIZ); signal(SIGUSR1, reloadsignal); setupserver(port, ip); for(;;) { |
