]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: remove comm_read_cancel(AsyncCall) API
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 5 Jun 2014 09:32:50 +0000 (02:32 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 5 Jun 2014 09:32:50 +0000 (02:32 -0700)
Converting remaining users of the old API wrapper to Comm::ReadCancel.

src/adaptation/icap/Xaction.cc
src/base/AsyncCalls.dox
src/comm.cc
src/comm/Read.h

index f353e7b1b18a2a0f97753f15baf93b1cd8e07816..55b7436c79c4f3d32efdde19d089939f5e516786 100644 (file)
@@ -428,7 +428,7 @@ void Adaptation::Icap::Xaction::cancelRead()
 {
     if (reader != NULL) {
         Must(haveConnection());
-        comm_read_cancel(connection->fd, reader);
+        Comm::ReadCancel(connection->fd, reader);
         reader = NULL;
     }
 }
index b0be201ee6d7d02a9a6a5d67276bee45dab39759..a14008c5f8567a7f2b1247d3396ef70c8cada1cb 100644 (file)
@@ -53,7 +53,7 @@ be dialed is irrelevant here.
 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
index 653e67c5a60b9bdbc133efdbd3dffcfa53de06ec..712d6e24d71f0c32fcf3da11291d0f516cbabc04 100644 (file)
@@ -1694,7 +1694,7 @@ commStopHalfClosedMonitor(int const fd)
     // 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);
index 3ba7f3415ac39a49aff478a1d5b249e4b23e84cd..69de56cc29454ba53b0559eb8d710c31e733b0f1 100644 (file)
@@ -50,6 +50,5 @@ inline void comm_read(const Comm::ConnectionPointer &conn, char *buf, int len, A
     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 */