]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Replace ConnStateData::notifyAllContexts() with Pipeline::terminateAll()
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Nov 2015 12:02:50 +0000 (04:02 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Nov 2015 12:02:50 +0000 (04:02 -0800)
src/client_side.cc
src/client_side.h
src/servers/Server.cc
src/servers/Server.h
src/tests/stub_client_side.cc

index b8b436467801c0452592adb23a9637eee6c022bf..2e0d6bb0ba40bf76aa7223ffbbe8b91bfb02e0a1 100644 (file)
@@ -658,15 +658,6 @@ httpRequestFree(void *data)
     delete http;
 }
 
-/// propagates abort event to all contexts
-void
-ConnStateData::notifyAllContexts(int xerrno)
-{
-    typedef ClientSocketContext::Pointer CSCP;
-    for (CSCP c = getCurrentContext(); c.getRaw(); c = c->next)
-        c->noteIoError(xerrno);
-}
-
 /* This is a handler normally called by comm_close() */
 void ConnStateData::connStateClosed(const CommCloseCbParams &)
 {
@@ -2242,7 +2233,7 @@ ConnStateData::connFinishedWithConn(int size)
         } else if (!Config.onoff.half_closed_clients) {
             /* admin doesn't want to support half-closed client sockets */
             debugs(33, 3, HERE << clientConnection << " aborted (half_closed_clients disabled)");
-            notifyAllContexts(0); // no specific error implies abort
+            pipeline.terminateAll(0);
             return true;
         }
     }
index 3b1914f2ae3905533ebb021072bc866a542eb4bc..5c399cbfce88cc215ccfcdd15db4e53a46fe4b24 100644 (file)
@@ -177,7 +177,6 @@ public:
     virtual ~ConnStateData();
 
     /* ::Server API */
-    virtual void notifyAllContexts(const int xerrno);
     virtual void receivedFirstByte();
     virtual bool handleReadData();
     virtual void afterClientRead();
index 09f8bcfba6dd21c85e45a12da41b1cc8986e784e..821fe69ea535e3b3011b5b40928dcdb028ec0b95 100644 (file)
@@ -168,7 +168,7 @@ Server::doClientRead(const CommIoCbParams &io)
     // case Comm::COMM_ERROR:
     default: // no other flags should ever occur
         debugs(33, 2, io.conn << ": got flag " << rd.flag << "; " << xstrerr(rd.xerrno));
-        notifyAllContexts(rd.xerrno);
+        pipeline.terminateAll(rd.xerrno);
         io.conn->close();
         return;
     }
index 1bec3efad571a64cec33e66cc2cae1590d400bd2..e7faf9b3233620b6ae0227d1b0073f6434aa2b24 100644 (file)
@@ -35,9 +35,6 @@ public:
     virtual bool doneAll() const;
     virtual void swanSong();
 
-    /// tell all active contexts on a connection about an error
-    virtual void notifyAllContexts(const int xerrno) = 0;
-
     /// ??
     virtual bool connFinishedWithConn(int size) = 0;
 
index 75383c51e573c965adcbbde6b8fccc3bbded68be..f206781584d2d1a460e4bcab78d9ad42edd68bd9 100644 (file)
@@ -36,7 +36,6 @@ void ClientSocketContext::registerWithConn() STUB
 void ClientSocketContext::noteIoError(const int xerrno) STUB
 void ClientSocketContext::writeControlMsg(HttpControlMsg &msg) STUB
 
-void ConnStateData::notifyAllContexts(const int xerrno) STUB
 bool ConnStateData::clientParseRequests() STUB_RETVAL(false)
 void ConnStateData::readNextRequest() STUB
 bool ConnStateData::isOpen() const STUB_RETVAL(false)