]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Use pipeline object for transaction accounting
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Nov 2015 09:55:45 +0000 (01:55 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Nov 2015 09:55:45 +0000 (01:55 -0800)
src/client_side.cc
src/client_side.h

index 29908e2f2f21e4e89f8a30157adfe3bb10c6d573..d3ef7e95a8b556c2e659910799264a541c8912af 100644 (file)
@@ -2269,7 +2269,7 @@ ConnStateData::addContextToQueue(ClientSocketContext * context)
             S = &(*S)->next);
     *S = context;
 
-    ++nrequests;
+    ++pipeline.nrequests;
 }
 
 int
@@ -2430,7 +2430,7 @@ bool
 clientTunnelOnError(ConnStateData *conn, ClientSocketContext *context, HttpRequest *request, const HttpRequestMethod& method, err_type requestError, Http::StatusCode errStatusCode, const char *requestErrorBytes)
 {
     if (conn->port->flags.isIntercepted() &&
-            Config.accessList.on_unsupported_protocol && conn->nrequests <= 1) {
+            Config.accessList.on_unsupported_protocol && conn->pipeline.nrequests <= 1) {
         ACLFilledChecklist checklist(Config.accessList.on_unsupported_protocol, request, NULL);
         checklist.requestErrorType = requestError;
         checklist.src_addr = conn->clientConnection->remote;
@@ -3274,7 +3274,6 @@ ConnStateData::ConnStateData(const MasterXaction::Pointer &xact) :
     AsyncJob("ConnStateData"), // kids overwrite
     Server(xact),
     bodyParser(nullptr),
-    nrequests(0),
 #if USE_OPENSSL
     sslBumpMode(Ssl::bumpEnd),
 #endif
index 72e2120cf5b63bc1fce504592fb0f865ed100e2f..953cd30633ff1bce001b446f6aff6e3aaee94320 100644 (file)
@@ -230,7 +230,6 @@ public:
     ClientSocketContext::Pointer currentobject;
 
     Ip::Address log_addr;
-    int nrequests;
 
     struct {
         bool readMore; ///< needs comm_read (for this request or new requests)