]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Merging async-call branch changes to HEAD:
authorrousskov <>
Wed, 13 Feb 2008 06:22:13 +0000 (06:22 +0000)
committerrousskov <>
Wed, 13 Feb 2008 06:22:13 +0000 (06:22 +0000)
        comm_has_pending_read() is now comm_monitors_read() to reflect
        our inability to track pending async callbacks. This call is
        used for debugging only.

        Converting commSetTimeout to use CommCalls. Also the
        CommTimeoutCbParams and CommTimeoutCbPtrFun classes added.

        comm_close handlers now scheduled as CommCalls.

src/fde.cc
src/fde.h

index 4966ff3bda82ab739266610ed6e130a6a061f6b3..09264431ab14d930f695eecdd38c8111edd8fd91 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fde.cc,v 1.7 2007/08/13 17:20:51 hno Exp $
+ * $Id: fde.cc,v 1.8 2008/02/12 23:22:13 rousskov Exp $
  *
  * DEBUG: none          FDE
  * AUTHOR: Robert Collins
@@ -43,7 +43,7 @@ bool
 fde::readPending(int fdNumber)
 {
     if (type == FD_SOCKET)
-        return comm_has_pending_read(fdNumber);
+        return comm_monitors_read(fdNumber);
 
     return read_handler ? true : false ;
 }
@@ -64,7 +64,7 @@ fde::dumpStats (StoreEntry &dumpEntry, int fdNumber)
                       fdNumber,
 #endif
                       fdTypeStr[type],
-                      timeout_handler ? (int) (timeout - squid_curtime) / 60 : 0,
+                      timeoutHandler != NULL ? (int) (timeout - squid_curtime) / 60 : 0,
                       bytes_read,
                       readPending(fdNumber) ? '*' : ' ',
                       bytes_written,
index 72954e8bef772e9e9baabc35cf39393f7124873f..e4875b5449eeea28580c899c120762f95c1cf62d 100644 (file)
--- a/src/fde.h
+++ b/src/fde.h
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fde.h,v 1.14 2007/12/14 23:11:46 amosjeffries Exp $
+ * $Id: fde.h,v 1.15 2008/02/12 23:22:13 rousskov Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -99,11 +99,10 @@ public:
     void *read_data;
     PF *write_handler;
     void *write_data;
-    PF *timeout_handler;
+    AsyncCall::Pointer timeoutHandler;
     time_t timeout;
-    void *timeout_data;
     void *lifetime_data;
-    close_handler *closeHandler;        /* linked list */
+    AsyncCall::Pointer closeHandler;
     CommWriteStateData *wstate;         /* State data for comm_write */
     READ_HANDLER *read_method;
     WRITE_HANDLER *write_method;