From: Dmitry Kurochkin Date: Thu, 22 Sep 2011 21:47:32 +0000 (-0600) Subject: Fix cache_dir type check during reconfiguration. X-Git-Tag: BumpSslServerFirst.take01~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca6483ebe369d4cee7bc695262af8ca4d72c216d;p=thirdparty%2Fsquid.git Fix cache_dir type check during reconfiguration. SwapDir::type() returns C strings which should be compared with strcmp(3) instead of checking pointers for equality. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index a2a3271efb..354a91e2d6 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1953,7 +1953,7 @@ parse_cachedir(SquidConfig::_cacheSwap * swap) sd = dynamic_cast(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;