------------------------------------------------------------ revno: 13443 revision-id: squid3@treenet.co.nz-20140605093250-4evs9x08blcfj0ah parent: squid3@treenet.co.nz-20140605082820-9th5ecz7lb7rfim9 committer: Amos Jeffries branch nick: trunk timestamp: Thu 2014-06-05 02:32:50 -0700 message: Cleanup: remove comm_read_cancel(AsyncCall) API Converting remaining users of the old API wrapper to Comm::ReadCancel. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140605093250-4evs9x08blcfj0ah # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: a9d57208d9f3735563e00cb7bf5bf7f294981e7e # timestamp: 2014-06-05 10:03:26 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140605082820-\ # 9th5ecz7lb7rfim9 # # Begin patch === modified file 'src/adaptation/icap/Xaction.cc' --- src/adaptation/icap/Xaction.cc 2013-06-18 06:22:13 +0000 +++ src/adaptation/icap/Xaction.cc 2014-06-05 09:32:50 +0000 @@ -428,7 +428,7 @@ { if (reader != NULL) { Must(haveConnection()); - comm_read_cancel(connection->fd, reader); + Comm::ReadCancel(connection->fd, reader); reader = NULL; } } === modified file 'src/base/AsyncCalls.dox' --- src/base/AsyncCalls.dox 2009-04-09 22:31:13 +0000 +++ src/base/AsyncCalls.dox 2014-06-05 09:32:50 +0000 @@ -53,7 +53,7 @@ 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 === modified file 'src/comm.cc' --- src/comm.cc 2014-06-05 08:28:20 +0000 +++ src/comm.cc 2014-06-05 09:32:50 +0000 @@ -1694,7 +1694,7 @@ // 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); === modified file 'src/comm/Read.h' --- src/comm/Read.h 2014-06-05 08:28:20 +0000 +++ src/comm/Read.h 2014-06-05 09:32:50 +0000 @@ -50,6 +50,5 @@ 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 */