]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Explicitly disabled ICAPConfig copying and assignment to prevent such things
authorrousskov <>
Thu, 28 Jun 2007 21:28:59 +0000 (21:28 +0000)
committerrousskov <>
Thu, 28 Jun 2007 21:28:59 +0000 (21:28 +0000)
from happening because the default/generated constructor and operator do not
do the right thing.

src/ICAP/ICAPConfig.cc
src/ICAP/ICAPConfig.h

index c6dabfb5a4fe39509264daf87acd1136546f54d1..8ff54b82e2bab7f67cc18cf7413a57323a6f84ef 100644 (file)
@@ -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;
+}
index 45aeb788a280ad2882ac86500a7619a3143d8120..eb62c5e7a7bb662c904029fc592d4b9639c1433f 100644 (file)
@@ -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;