masqmail

diff src/masqmail.c @ 155:b5ab9cb2f18a

shut down on errors reading config file while reading config file, log to log file note: this breaks after SIGHUP
author meillo@marmaro.de
date Thu, 08 Jul 2010 09:43:27 +0200
parents 5ec5e6637049
children 5b621742b2e7
line diff
     1.1 --- a/src/masqmail.c	Thu Jul 08 09:20:34 2010 +0200
     1.2 +++ b/src/masqmail.c	Thu Jul 08 09:43:27 2010 +0200
     1.3 @@ -641,7 +641,13 @@
     1.4  		}
     1.5  	}
     1.6  
     1.7 -	read_conf(conf_file);
     1.8 +	conf.log_dir = LOG_DIR;
     1.9 +	logopen();
    1.10 +	if (!read_conf(conf_file)) {
    1.11 +		logwrite(LOG_ALERT, "SHUTTING DOWN due to problems reading config\n");
    1.12 +		exit(5);
    1.13 +	}
    1.14 +	logclose();
    1.15  
    1.16  	if (do_queue)
    1.17  		conf.do_queue = TRUE;