From: Amos Jeffries Date: Sun, 15 Nov 2015 10:43:52 +0000 (-0800) Subject: Remove ConnStateData::areAllContextsForThisConnection() X-Git-Tag: SQUID_4_0_3~5^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90a495650570de223aaf6480ecfc94ee872982ac;p=thirdparty%2Fsquid.git Remove ConnStateData::areAllContextsForThisConnection() --- diff --git a/src/client_side.cc b/src/client_side.cc index b9b5dd9707..d15c23d8c1 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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. */ diff --git a/src/client_side.h b/src/client_side.h index ac6bad745b..388fa52ebe 100644 --- a/src/client_side.h +++ b/src/client_side.h @@ -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(); diff --git a/src/tests/stub_client_side.cc b/src/tests/stub_client_side.cc index 145c86e3c9..ecd31fa4ec 100644 --- a/src/tests/stub_client_side.cc +++ b/src/tests/stub_client_side.cc @@ -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)