]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Reverted revision 1.442 change that was supposed to fix
authorrousskov <>
Fri, 13 Apr 2007 10:52:19 +0000 (10:52 +0000)
committerrousskov <>
Fri, 13 Apr 2007 10:52:19 +0000 (10:52 +0000)
bug #1837: Segfault on configuration error

It turns out a better fix for the same bug has been already committed
by Duane Wessels:

    1.88      +2 -2      squid3/src/store_rebuild.cc
    1.157     +9 -2      squid3/src/store_dir.cc

    store_dirs_rebuilding should be initialized to 1

    store_dirs_rebuilding is initialized to _1_ as a hack so that
    storeDirWriteCleanLogs() doesn't try to do anything unless _all_
    cache_dirs have been read.  For example, without this hack, Squid
    will try to write clean log files if -kparse fails (becasue it
    calls fatal()).

src/main.cc

index 1e85fc9d97565a4ba1eb0eca67602eb0d297e492..3f15e7378b374af516c8e620852fc19391b9acc1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.442 2007/04/12 14:51:10 rousskov Exp $
+ * $Id: main.cc,v 1.443 2007/04/13 04:52:19 rousskov Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -1184,10 +1184,6 @@ main(int argc, char **argv)
 
         Mem::Init();
 
-        setMaxFD();
-
-        comm_init(); /* initialize early to handle fatal() errors */
-
         storeFsInit();         /* required for config parsing */
 
         /* May not be needed for parsing, have not audited for such */
@@ -1211,6 +1207,7 @@ main(int argc, char **argv)
 
 #if TEST_ACCESS
 
+    comm_init();
 
     comm_select_init();
 
@@ -1258,6 +1255,10 @@ main(int argc, char **argv)
     if (!opt_no_daemon)
         watch_child(argv);
 
+    setMaxFD();
+
+    /* init comm module */
+    comm_init();
 
     comm_select_init();