]> 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>
Sun, 19 May 2013 02:43:38 +0000 (20:43 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 19 May 2013 02:43:38 +0000 (20:43 -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 598de58dc087d12a7f7aaa8db6984c870ee19c0e..acbb49128928621e4ef733f03660e11d137a4f6a 100644 (file)
@@ -1903,8 +1903,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 */