]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1598: start_announce cannot be disabled
authorserassio <>
Sat, 2 Sep 2006 14:43:37 +0000 (14:43 +0000)
committerserassio <>
Sat, 2 Sep 2006 14:43:37 +0000 (14:43 +0000)
And also cannot be enabled with reconfigure.

src/main.cc

index 23541fb6c66cee21cb351f90649cbeb865fc9603..b1b741411091ade9eb1786b60a36ea0a16fc4885 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.432 2006/08/21 00:50:41 robertc Exp $
+ * $Id: main.cc,v 1.433 2006/09/02 08:43:37 serassio Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -703,6 +703,14 @@ mainReconfigure(void)
 
     mimeInit(Config.mimeTablePathname);
 
+    if (Config.onoff.announce) {
+        if (!eventFind(start_announce, NULL))
+            eventAdd("start_announce", start_announce, NULL, 3600.0, 1);
+    } else {
+        if (eventFind(start_announce, NULL))
+            eventDelete(start_announce, NULL);
+    }
+
     writePidFile();            /* write PID file */
 
     debug(1, 1) ("Ready to serve requests.\n");