]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix cache_dir type check during reconfiguration.
authorDmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Thu, 22 Sep 2011 21:47:32 +0000 (15:47 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 22 Sep 2011 21:47:32 +0000 (15:47 -0600)
SwapDir::type() returns C strings which should be compared with
strcmp(3) instead of checking pointers for equality.

src/cache_cf.cc

index a2a3271efb9fa6c62b1d9b4ff2febccd1ab7f371..354a91e2d6e782dba0f753900c79b5fd5cefc604 100644 (file)
@@ -1953,7 +1953,7 @@ parse_cachedir(SquidConfig::_cacheSwap * swap)
 
             sd = dynamic_cast<SwapDir *>(swap->swapDirs[i].getRaw());
 
-            if (sd->type() != StoreFileSystem::FileSystems().items[fs]->type()) {
+            if (strcmp(sd->type(), StoreFileSystem::FileSystems().items[fs]->type()) != 0) {
                 debugs(3, 0, "ERROR: Can't change type of existing cache_dir " <<
                        sd->type() << " " << sd->path << " to " << type_str << ". Restart required");
                 return;