]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Squid crashes on shutdown while cleaning up idle ICAP connections, part2
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Thu, 8 Sep 2016 10:25:37 +0000 (13:25 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Thu, 8 Sep 2016 10:25:37 +0000 (13:25 +0300)
Fixes to allow make check work:
 - Fix tests/stub_pconn.cc to correctly implement a stub IdleConnList
 - Replace reinterpret_cast with static_cast to avoid errors when clang is used.
   The IdleConnList is now a hash_link kid and static_cast is the correct one.

src/pconn.cc
src/tests/stub_pconn.cc

index a038cec5b6cc9cdb389b5d3ff9ef584eb092b2c2..2cb8415d942a3ab2665f380bb7f41bc2378fb6ad 100644 (file)
@@ -392,7 +392,7 @@ PconnPool::PconnPool(const char *aDescr, const CbcPointer<PeerPoolMgr> &aMgr):
 static void
 DeleteIdleConnList(void *hashItem)
 {
-    delete reinterpret_cast<IdleConnList*>(hashItem);
+    delete static_cast<IdleConnList*>(hashItem);
 }
 
 PconnPool::~PconnPool()
@@ -491,7 +491,7 @@ PconnPool::closeN(int n)
         }
 
         // may delete current
-        reinterpret_cast<IdleConnList*>(current)->closeN(1);
+        static_cast<IdleConnList*>(current)->closeN(1);
     }
 }
 
index 4ab709049ab790af6201f21284caf6ffa8b7ee89..352876d15924e18e143909d6bb205f5ae3fe7ab5 100644 (file)
 #define STUB_API "pconn.cc"
 #include "tests/STUB.h"
 
-IdleConnList::IdleConnList(const char *key, PconnPool *parent) STUB
+IdleConnList::IdleConnList(const char *akey, PconnPool *parent) STUB
 IdleConnList::~IdleConnList() STUB
 void IdleConnList::push(const Comm::ConnectionPointer &conn) STUB
-Comm::ConnectionPointer IdleConnList::findUseable(const Comm::ConnectionPointer &key) STUB_RETVAL(Comm::ConnectionPointer())
+Comm::ConnectionPointer IdleConnList::findUseable(const Comm::ConnectionPointer &akey) STUB_RETVAL(Comm::ConnectionPointer())
 void IdleConnList::clearHandlers(const Comm::ConnectionPointer &conn) STUB
+void IdleConnList::endingShutdown() STUB
 PconnPool::PconnPool(const char *, const CbcPointer<PeerPoolMgr>&) STUB
 PconnPool::~PconnPool() STUB
 void PconnPool::moduleInit() STUB