diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-09-16 20:11:54 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-09-16 20:11:54 +0000 |
commit | 490754594eddcf95d764818afdf935ed4d2f2fdf (patch) | |
tree | a5c1fe6e3f003d6540c9d9bda4796ec8d9aa6416 /src/tinyproxy.c | |
parent | 2a566d194dc9ee0eabd768dd3fb6375558b5f563 (diff) | |
download | tinyproxy-490754594eddcf95d764818afdf935ed4d2f2fdf.tar.gz tinyproxy-490754594eddcf95d764818afdf935ed4d2f2fdf.zip |
Added a check to make sure the Upstream and Tunnel directives are not both
set in the configuration file.
Diffstat (limited to '')
-rw-r--r-- | src/tinyproxy.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tinyproxy.c b/src/tinyproxy.c index d350bbd..8269ea1 100644 --- a/src/tinyproxy.c +++ b/src/tinyproxy.c @@ -1,4 +1,4 @@ -/* $Id: tinyproxy.c,v 1.16 2001-09-16 05:38:27 rjkaes Exp $ +/* $Id: tinyproxy.c,v 1.17 2001-09-16 20:11:54 rjkaes Exp $ * * The initialise routine. Basically sets up all the initial stuff (logfile, * listening socket, config options, etc.) and then sits there and loops @@ -250,6 +250,13 @@ int main(int argc, char **argv) } yyparse(); +#if defined(TUNNEL_SUPPORT) && defined(UPSTREAM_SUPPORT) + if (config.tunnel_name && config.upstream_name) { + fprintf(stderr, "%s: \"Tunnel\" and \"Upstream\" directives can not be both set.\n", argv[0]); + exit(EX_SOFTWARE); + } +#endif + /* Open the log file if not using syslog */ if (config.syslog == FALSE) { int log_file_fd; |