From: rousskov <> Date: Thu, 28 Jun 2007 21:28:59 +0000 (+0000) Subject: Explicitly disabled ICAPConfig copying and assignment to prevent such things X-Git-Tag: SQUID_3_0_PRE7~176 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee6f6484e26962b1db54b7fbd6cce3fbdcf3f061;p=thirdparty%2Fsquid.git Explicitly disabled ICAPConfig copying and assignment to prevent such things from happening because the default/generated constructor and operator do not do the right thing. --- diff --git a/src/ICAP/ICAPConfig.cc b/src/ICAP/ICAPConfig.cc index c6dabfb5a4..8ff54b82e2 100644 --- a/src/ICAP/ICAPConfig.cc +++ b/src/ICAP/ICAPConfig.cc @@ -1,6 +1,6 @@ /* - * $Id: ICAPConfig.cc,v 1.18 2007/06/28 15:11:01 rousskov Exp $ + * $Id: ICAPConfig.cc,v 1.19 2007/06/28 15:28:59 rousskov Exp $ * * SQUID Web Proxy Cache http://www.squid-cache.org/ * ---------------------------------------------------------- @@ -448,3 +448,14 @@ time_t ICAPConfig::io_timeout(bool) const // can still be bypassed return Config.Timeout.read; } + +ICAPConfig::ICAPConfig(const ICAPConfig &) +{ + assert(false); // unsupported +} + +ICAPConfig &ICAPConfig::operator =(const ICAPConfig &) +{ + assert(false); // unsupported + return *this; +} diff --git a/src/ICAP/ICAPConfig.h b/src/ICAP/ICAPConfig.h index 45aeb788a2..eb62c5e7a7 100644 --- a/src/ICAP/ICAPConfig.h +++ b/src/ICAP/ICAPConfig.h @@ -1,6 +1,6 @@ /* - * $Id: ICAPConfig.h,v 1.15 2007/06/28 15:11:01 rousskov Exp $ + * $Id: ICAPConfig.h,v 1.16 2007/06/28 15:28:59 rousskov Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -131,6 +131,9 @@ public: void freeICAPAccess(void); void dumpICAPAccess(StoreEntry *, const char *) const; +private: + ICAPConfig(const ICAPConfig &); // unsupported + ICAPConfig &operator =(const ICAPConfig &); // unsupported }; extern ICAPConfig TheICAPConfig;