]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
make 'redirect_program' a wordlist so you can have command line args
authorwessels <>
Thu, 8 Apr 1999 03:39:04 +0000 (03:39 +0000)
committerwessels <>
Thu, 8 Apr 1999 03:39:04 +0000 (03:39 +0000)
src/cache_cf.cc
src/cf.data.pre
src/redirect.cc
src/structs.h

index 70db8658174ecfce5e466ae88a8b00042e72c4d4..f99d430b1ca9973df48bcc802a2479496d93dbbe 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.324 1999/01/29 23:39:12 wessels Exp $
+ * $Id: cache_cf.cc,v 1.325 1999/04/07 21:39:04 wessels Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -230,7 +230,7 @@ configDoConfigure(void)
     if (Config.Program.redirect) {
        if (Config.redirectChildren < 1) {
            Config.redirectChildren = 0;
-           safe_free(Config.Program.redirect);
+           wordlistDestroy(&Config.Program.redirect);
        } else if (Config.redirectChildren > DefaultRedirectChildrenMax) {
            debug(3, 0) ("WARNING: redirect_children was set to a bad value: %d\n",
                Config.redirectChildren);
@@ -300,7 +300,7 @@ configDoConfigure(void)
     requirePathnameExists("cache_dns_program", Config.Program.dnsserver);
     requirePathnameExists("unlinkd_program", Config.Program.unlinkd);
     if (Config.Program.redirect)
-       requirePathnameExists("redirect_program", Config.Program.redirect);
+       requirePathnameExists("redirect_program", Config.Program.redirect->key);
     if (Config.Program.authenticate)
        requirePathnameExists("authenticate_program", Config.Program.authenticate->key);
     requirePathnameExists("Icon Directory", Config.icons.directory);
@@ -1547,7 +1547,7 @@ check_null_wordlist(wordlist * w)
 }
 
 static int
-check_null_acl_access(acl_access *a)
+check_null_acl_access(acl_access * a)
 {
     return a == NULL;
 }
index 5b37684efa1da5dfde25e956b502e77009274047..b0b48c0a576b51028fe49f08d6ab10f91df432ec 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.145 1999/04/07 21:13:20 wessels Exp $
+# $Id: cf.data.pre,v 1.146 1999/04/07 21:39:05 wessels Exp $
 #
 #
 # SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -931,7 +931,7 @@ DOC_END
 
 
 NAME: redirect_program
-TYPE: string
+TYPE: wordlist
 LOC: Config.Program.redirect
 DEFAULT: none
 DOC_START
index 68c342fc95c273cc241ef71e60193d41ea92dfde..1e2443e463ed73ff7d3b24e30c811801ecc65bf6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: redirect.cc,v 1.78 1999/01/24 02:22:59 wessels Exp $
+ * $Id: redirect.cc,v 1.79 1999/04/07 21:39:06 wessels Exp $
  *
  * DEBUG: section 29    Redirector
  * AUTHOR: Duane Wessels
@@ -131,7 +131,7 @@ redirectInit(void)
        return;
     if (redirectors == NULL)
        redirectors = helperCreate("redirector");
-    wordlistAdd(&redirectors->cmdline, Config.Program.redirect);
+    redirectors->cmdline = Config.Program.redirect;
     redirectors->n_to_start = Config.redirectChildren;
     redirectors->ipc_type = IPC_TCP_SOCKET;
     helperOpenServers(redirectors);
@@ -149,7 +149,6 @@ redirectShutdown(void)
     if (!redirectors)
        return;
     helperShutdown(redirectors);
-    wordlistDestroy(&redirectors->cmdline);
     if (!shutting_down)
        return;
     helperFree(redirectors);
index 274b8afa21efb9966162533073791447a068175b..875f7fd5c7fb9127969a8f32688591dd9d1292ee 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.276 1999/01/29 23:39:24 wessels Exp $
+ * $Id: structs.h,v 1.277 1999/04/07 21:39:06 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -282,7 +282,7 @@ struct _SquidConfig {
     char *effectiveGroup;
     struct {
        char *dnsserver;
-       char *redirect;
+       wordlist *redirect;
        wordlist *authenticate;
        char *pinger;
        char *unlinkd;