summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2001-09-16 20:11:54 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2001-09-16 20:11:54 +0000
commit490754594eddcf95d764818afdf935ed4d2f2fdf (patch)
treea5c1fe6e3f003d6540c9d9bda4796ec8d9aa6416
parent2a566d194dc9ee0eabd768dd3fb6375558b5f563 (diff)
downloadtinyproxy-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.
-rw-r--r--src/tinyproxy.c9
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;