debugs(17, 3, "because " << reason << "; " << serverConn);
assert(Comm::IsConnOpen(serverConn));
comm_remove_close_handler(serverConn->fd, closeHandler);
- closeHandler = NULL;
+ closeHandler = nullptr;
fwdPconnPool->noteUses(fd_table[serverConn->fd].pconn.uses);
serverConn->close();
}
entry(e),
request(r),
al(alp),
- err(NULL),
+ err(nullptr),
clientConn(client),
start_t(squid_curtime),
n_tries(0),
assert(err);
updateAleWithFinalError();
errorAppendEntry(entry, err);
- err = NULL;
+ err = nullptr;
#if USE_OPENSSL
if (request->flags.sslPeek && request->clientConnectionManager.valid()) {
CallJobHere1(17, 4, request->clientConnectionManager, ConnStateData,
entry->unlock("FwdState");
- entry = NULL;
+ entry = nullptr;
cancelStep("~FwdState");
* Intentionally replace the src_addr automatically selected by the checklist code
* we do NOT want the indirect client address to be tested here.
*/
- ACLFilledChecklist ch(Config.accessList.miss, request, NULL);
+ ACLFilledChecklist ch(Config.accessList.miss, request, nullptr);
ch.al = al;
ch.src_addr = request->client_addr;
ch.syncAle(request, nullptr);
FwdState::fwdStart(const Comm::ConnectionPointer &clientConn, StoreEntry *entry, HttpRequest *request)
{
// Hides AccessLogEntry.h from code that does not supply ALE anyway.
- Start(clientConn, entry, request, NULL);
+ Start(clientConn, entry, request, nullptr);
}
/// subtracts time_t values, returning zero if smaller exceeds the larger value
assert(serverConnection() == conn);
assert(Comm::IsConnOpen(conn));
comm_remove_close_handler(conn->fd, closeHandler);
- closeHandler = NULL;
- serverConn = NULL;
+ closeHandler = nullptr;
+ serverConn = nullptr;
destinationReceipt = nullptr;
}
// Optimize: A compliant proxy may retry PUTs, but Squid lacks the [rather
// complicated] code required to protect the PUT request body from being
// nibbled during the first try. Thus, Squid cannot retry some PUTs today.
- if (request->body_pipe != NULL)
+ if (request->body_pipe != nullptr)
return false;
// RFC2616 9.1 Safe and Idempotent Methods
request->hier.stopPeerClock(false);
- if (self != NULL && !err && shutting_down && entry->isEmpty()) {
+ if (self != nullptr && !err && shutting_down && entry->isEmpty()) {
const auto anErr = new ErrorState(ERR_SHUTTING_DOWN, Http::scServiceUnavailable, request, al);
errorAppendEntry(entry, anErr);
}
void
FwdState::doneWithRetries()
{
- if (request && request->body_pipe != NULL)
+ if (request && request->body_pipe != nullptr)
request->body_pipe->expectNoConsumption();
}
return; // anything will do.
}
- ACLFilledChecklist ch(NULL, request, NULL);
- ch.dst_peer_name = conn->getPeer() ? conn->getPeer()->name : NULL;
+ ACLFilledChecklist ch(nullptr, request, nullptr);
+ ch.dst_peer_name = conn->getPeer() ? conn->getPeer()->name : nullptr;
ch.dst_addr = conn->remote;
// TODO use the connection details in ACL.
if (!Ip::Qos::TheConfig.tosToServer)
return 0;
- ACLFilledChecklist ch(NULL, request, NULL);
+ ACLFilledChecklist ch(nullptr, request, nullptr);
ch.dst_peer_name = conn.getPeer() ? conn.getPeer()->name : nullptr;
ch.dst_addr = conn.remote;
return aclMapTOS(Ip::Qos::TheConfig.tosToServer, &ch);
if (!Ip::Qos::TheConfig.nfmarkToServer)
return 0;
- ACLFilledChecklist ch(NULL, request, NULL);
+ ACLFilledChecklist ch(nullptr, request, nullptr);
ch.dst_peer_name = conn.getPeer() ? conn.getPeer()->name : nullptr;
ch.dst_addr = conn.remote;
const auto mc = aclFindNfMarkConfig(Ip::Qos::TheConfig.nfmarkToServer, &ch);