bool
Comm::MonitorsRead(int fd)
{
- assert(isOpen(fd) && COMMIO_FD_READCB(fd) != NULL);
+ assert(isOpen(fd) && COMMIO_FD_READCB(fd) != nullptr);
// Being active is usually the same as monitoring because we always
// start monitoring the FD when we configure Comm::IoCallback for I/O
// and we usually configure Comm::IoCallback for I/O when we starting
{
// TODO: move comm_read_base() internals into here
// when comm_read() char* API is no longer needed
- comm_read_base(conn, NULL, 0, callback);
+ comm_read_base(conn, nullptr, 0, callback);
}
/**
// Active/passive conflicts are OK and simply cancel passive monitoring.
if (ccb->active()) {
// if the assertion below fails, we have an active comm_read conflict
- assert(fd_table[conn->fd].halfClosedReader != NULL);
+ assert(fd_table[conn->fd].halfClosedReader != nullptr);
commStopHalfClosedMonitor(conn->fd);
assert(!ccb->active());
}
ccb->conn = conn;
/* Queue the read */
- ccb->setCallback(Comm::IOCB_READ, callback, (char *)buf, NULL, size);
+ ccb->setCallback(Comm::IOCB_READ, callback, (char *)buf, nullptr, size);
Comm::SetSelect(conn->fd, COMM_SELECT_READ, Comm::HandleRead, ccb, 0);
}
cb->cancel("old comm_read_cancel");
/* And the IO event */
- Comm::SetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
+ Comm::SetSelect(fd, COMM_SELECT_READ, nullptr, nullptr, 0);
}
void
cb->cancel("comm_read_cancel");
/* And the IO event */
- Comm::SetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
+ Comm::SetSelect(fd, COMM_SELECT_READ, nullptr, nullptr, 0);
}
time_t