diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-06-04 23:30:34 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-06-04 23:30:34 +0000 |
commit | f43404aeef058d22d202ae741924fca24744054e (patch) | |
tree | c9daa388d5e181167ba6d409ef4683c98cb6c150 | |
parent | 93d352853b5aa171258135215ebcb2ee7c70629e (diff) | |
download | tinyproxy-f43404aeef058d22d202ae741924fca24744054e.tar.gz tinyproxy-f43404aeef058d22d202ae741924fca24744054e.zip |
Removed the DEFAULT_LOG, DEFAULT_PORT, and DEFAULT_USER directives since
these MUST be set in the configuration file.
-rw-r--r-- | src/tinyproxy.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tinyproxy.c b/src/tinyproxy.c index 39982f8..e342606 100644 --- a/src/tinyproxy.c +++ b/src/tinyproxy.c @@ -1,4 +1,4 @@ -/* $Id: tinyproxy.c,v 1.10 2001-06-02 03:10:34 rjkaes Exp $ +/* $Id: tinyproxy.c,v 1.11 2001-06-04 23:30:34 rjkaes Exp $ * * The initialise routine. Basically sets up all the initial stuff (logfile, * listening socket, config options, etc.) and then sits there and loops @@ -202,8 +202,8 @@ int main(int argc, char **argv) /* Open the log file if not using syslog */ if (config.syslog == FALSE) { if (!config.logf_name) { - log_message(LOG_INFO, "Setting Logfile to \"%s\"", DEFAULT_LOG); - config.logf_name = DEFAULT_LOG; + fprintf(stderr, "You MUST set a LogFile in the configuration file.\n"); + exit(EX_SOFTWARE); } if (!(config.logf = fopen(config.logf_name, "a"))) { @@ -225,16 +225,15 @@ int main(int argc, char **argv) * Set the default values if they were not set in the config file. */ if (config.port == 0) { - log_message(LOG_INFO, "Setting Port to %u", DEFAULT_PORT); - config.port = DEFAULT_PORT; + fprintf(stderr, "You MUST set a Port in the configuration file\n"); + exit(EX_SOFTWARE); } if (!config.stathost) { log_message(LOG_INFO, "Setting stathost to \"%s\"", DEFAULT_STATHOST); config.stathost = DEFAULT_STATHOST; } if (!config.username) { - log_message(LOG_INFO, "Setting user to \"%s\"", DEFAULT_USER); - config.username = DEFAULT_USER; + log_message(LOG_WARNING, "You SHOULD set a UserName in the configuration file. Using current user instead."); } if (config.idletimeout == 0) { log_message(LOG_INFO, "Setting idle timeout to %u seconds", MAX_IDLE_TIME); |