]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/comm/ModKqueue.cc
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / comm / ModKqueue.cc
index b6aed3359263fb534606b336704c8db14ea36bf2..29a75f3aa8ae70df810fb0451753bfff792bf5f7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -168,7 +168,7 @@ Comm::SetSelect(int fd, unsigned int type, PF * handler, void *client_data, time
 {
     fde *F = &fd_table[fd];
     assert(fd >= 0);
-    assert(F->flags.open);
+    assert(F->flags.open || (!handler && !client_data && !timeout));
     debugs(5, 5, HERE << "FD " << fd << ", type=" << type <<
            ", handler=" << handler << ", client_data=" << client_data <<
            ", timeout=" << timeout);
@@ -194,18 +194,6 @@ Comm::SetSelect(int fd, unsigned int type, PF * handler, void *client_data, time
 
 }
 
-void
-Comm::ResetSelect(int fd)
-{
-    fde *F = &fd_table[fd];
-    if (F->read_handler) {
-        kq_update_events(fd, EVFILT_READ, (PF *)1);
-    }
-    if (F->write_handler) {
-        kq_update_events(fd, EVFILT_WRITE, (PF *)1);
-    }
-}
-
 /*
  * Check all connections for new connections and input data that is to be
  * processed. Also check for connections with data queued and whether we can
@@ -274,7 +262,6 @@ Comm::DoSelect(int msec)
         if (ke[i].filter == EVFILT_READ || F->flags.read_pending) {
             if ((hdl = F->read_handler) != NULL) {
                 F->read_handler = NULL;
-                F->flags.read_pending = 0;
                 hdl(fd, F->read_data);
             }
         }