]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Log an ERROR instead of halting on unknown cache_dir types
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 14 May 2013 15:31:15 +0000 (09:31 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 14 May 2013 15:31:15 +0000 (09:31 -0600)
Squid-3 can run fine without any configured cache_dir. This assists with
upgrade from older Squid-2 where COSS or NULL cache types may be present.
It also assists with backward compatibility for any future cache types
which may be added in future.

src/cache_cf.cc

index 6d154335647a04b4fad4f95a4d712adf263b6a33..f26e43db5119be854590f96e147ef1aeb1848eae 100644 (file)
@@ -1912,8 +1912,10 @@ parse_cachedir(SquidConfig::_cacheSwap * swap)
 
     fs = find_fstype(type_str);
 
-    if (fs < 0)
-        self_destruct();
+    if (fs < 0) {
+        debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: This proxy does not support the '" << type_str << "' cache type. Ignoring.");
+        return;
+    }
 
     /* reconfigure existing dir */