]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove ConnStateData::areAllContextsForThisConnection()
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Nov 2015 10:43:52 +0000 (02:43 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Nov 2015 10:43:52 +0000 (02:43 -0800)
src/client_side.cc
src/client_side.h
src/tests/stub_client_side.cc

index b9b5dd97077147f27d5245b2e0a2986ee5e6a518..d15c23d8c1157a40ec7f9a28f9da1de123d2f2b3 100644 (file)
@@ -658,21 +658,6 @@ httpRequestFree(void *data)
     delete http;
 }
 
-bool
-ConnStateData::areAllContextsForThisConnection() const
-{
-    ClientSocketContext::Pointer context = getCurrentContext();
-
-    while (context.getRaw()) {
-        if (context->http->getConn() != this)
-            return false;
-
-        context = context->next;
-    }
-
-    return true;
-}
-
 void
 ConnStateData::freeAllContexts()
 {
@@ -790,7 +775,6 @@ ConnStateData::swanSong()
     flags.readMore = false;
     DeregisterRunner(this);
     clientdbEstablished(clientConnection->remote, -1);  /* decrement */
-    assert(areAllContextsForThisConnection());
     freeAllContexts();
 
     unpinConnection(true);
@@ -3799,7 +3783,6 @@ void ConnStateData::buildSslCertGenerationParams(Ssl::CertificateProperties &cer
 void
 ConnStateData::getSslContextStart()
 {
-    assert(areAllContextsForThisConnection());
     freeAllContexts();
     /* careful: freeAllContexts() above frees request, host, etc. */
 
index ac6bad745b0d57c7a3fc6be231a69a073215ffd2..388fa52ebeeb7f5a77a5d0f4d08e27f0e5eac100 100644 (file)
@@ -62,7 +62,7 @@ class PortCfg;
  *
  * XXX: If an async call ends the ClientHttpRequest job, ClientSocketContext
  * (and ConnStateData) may not know about it, leading to segfaults and
- * assertions like areAllContextsForThisConnection(). This is difficult to fix
+ * assertions. This is difficult to fix
  * because ClientHttpRequest lacks a good way to communicate its ongoing
  * destruction back to the ClientSocketContext which pretends to "own" *http.
  */
@@ -182,7 +182,6 @@ public:
     virtual bool handleReadData();
     virtual void afterClientRead();
 
-    bool areAllContextsForThisConnection() const;
     void freeAllContexts();
     /// Traffic parsing
     bool clientParseRequests();
index 145c86e3c998078232bba9f1cd92e44fab9c3697..ecd31fa4ecd64fa57773527411df75abd6e1f0f5 100644 (file)
@@ -36,7 +36,6 @@ void ClientSocketContext::registerWithConn() STUB
 void ClientSocketContext::noteIoError(const int xerrno) STUB
 void ClientSocketContext::writeControlMsg(HttpControlMsg &msg) STUB
 
-bool ConnStateData::areAllContextsForThisConnection() const STUB_RETVAL(false)
 void ConnStateData::freeAllContexts() STUB
 void ConnStateData::notifyAllContexts(const int xerrno) STUB
 bool ConnStateData::clientParseRequests() STUB_RETVAL(false)