From 9e5f21db7f39053f0c1e484a259ab960e8628f74 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Sun, 5 Mar 2006 02:02:15 +0000 Subject: [PATCH] fix for STDERR problem in rend-unix --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 50af112e..6a9ef9ed 100644 --- a/src/main.c +++ b/src/main.c @@ -162,7 +162,6 @@ int main(int argc, char *argv[]) { int option; char *configfile=DEFAULT_CONFIGFILE; WSCONFIG ws_config; - int foreground=0; int reload=0; int start_time; int end_time; @@ -187,6 +186,7 @@ int main(int argc, char *argv[]) { config.use_mdns=1; err_setlevel(1); + config.foreground=0; while((option=getopt(argc,argv,"D:d:c:P:mfrysiu")) != -1) { switch(option) { case 'd': @@ -199,7 +199,7 @@ int main(int argc, char *argv[]) { } break; case 'f': - foreground=1; + config.foreground=1; break; case 'c': @@ -264,7 +264,7 @@ int main(int argc, char *argv[]) { DPRINTF(E_LOG,L_MAIN,"Starting with debuglevel %d\n",err_getlevel()); - if(!foreground) { + if(!config.foreground) { size = PATH_MAX; if(conf_get_string("general","logfile",NULL,logfile,&size) == CONF_E_SUCCESS) { err_setdest(logfile,LOGDEST_LOGFILE); @@ -284,7 +284,7 @@ int main(int argc, char *argv[]) { } #endif - if(!os_init(foreground)) { + if(!os_init(config.foreground)) { DPRINTF(E_LOG,L_MAIN,"Could not initialize server\n"); os_deinit(); exit(EXIT_FAILURE);