Comm::TcpAcceptor::unsubscribe(const char *reason)
{
debugs(5, 5, status() << " AsyncCall Subscription " << theCallSub << " removed: " << reason);
- theCallSub = NULL;
+ theCallSub = nullptr;
}
void
}
// stop when handlers are gone
- if (theCallSub == NULL) {
+ if (theCallSub == nullptr) {
return AsyncJob::doneAll();
}
debugs(5,5, MYNAME);
unsubscribe("swanSong");
if (IsConnOpen(conn)) {
- if (closer_ != NULL)
+ if (closer_ != nullptr)
comm_remove_close_handler(conn->fd, closer_);
conn->close();
}
- conn = NULL;
+ conn = nullptr;
AcceptLimiter::Instance().removeDead(this);
AsyncJob::swanSong();
}
const char *
Comm::TcpAcceptor::status() const
{
- if (conn == NULL)
+ if (conn == nullptr)
return "[nil connection]";
static char ipbuf[MAX_IPSTRLEN] = {'\0'};
void
Comm::TcpAcceptor::handleClosure(const CommCloseCbParams &)
{
- closer_ = NULL;
+ closer_ = nullptr;
if (conn) {
conn->noteClosure();
conn = nullptr;
return;
}
- if (theCallSub != NULL) {
+ if (theCallSub != nullptr) {
AsyncCall::Pointer call = theCallSub->callback();
CommAcceptCbParams ¶ms = GetCommParams<CommAcceptCbParams>(call);
params.port = listenPort_;
{
++statCounter.syscalls.sock.accepts;
int sock;
- struct addrinfo *gai = NULL;
+ struct addrinfo *gai = nullptr;
Ip::Address::InitAddr(gai);
errcode = 0; // reset local errno copy.