Converting remaining users of the old API wrapper to Comm::ReadCancel.
{
if (reader != NULL) {
Must(haveConnection());
- comm_read_cancel(connection->fd, reader);
+ Comm::ReadCancel(connection->fd, reader);
reader = NULL;
}
}
handle the call back, then it must cancel it. Whether that Call will be
scheduled is irrelevant here. If the Recipient has an AsyncCall pointer,
calling AsyncCall::cancel is sufficient, but the code should use
-call-specific APIs when possible (e.g., comm_read_cancel or comm_close).
+call-specific APIs when possible (e.g., Comm::ReadCancel or comm_close).
- Processed calls should be forgotten: If you scheduled, received, or
cancel the call, set its pointer to NULL. The Caller should forget the
// cancel the read if one was scheduled
AsyncCall::Pointer reader = fd_table[fd].halfClosedReader;
if (reader != NULL)
- comm_read_cancel(fd, reader);
+ Comm::ReadCancel(fd, reader);
fd_table[fd].halfClosedReader = NULL;
TheHalfClosed->del(fd);
comm_read_base(conn, buf, len, callback);
}
void comm_read_cancel(int fd, IOCB *callback, void *data);
-inline void comm_read_cancel(int fd, AsyncCall::Pointer &callback) {Comm::ReadCancel(fd,callback);}
#endif /* _SQUID_COMM_READ_H */