From 490754594eddcf95d764818afdf935ed4d2f2fdf Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Sun, 16 Sep 2001 20:11:54 +0000 Subject: Added a check to make sure the Upstream and Tunnel directives are not both set in the configuration file. --- src/tinyproxy.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3