REORG/MEDIUM: fd: remove FD_STCLOSE from struct fdtab
In an attempt to get rid of fdtab[].state, and to move the relevant
parts to the connection struct, we remove the FD_STCLOSE state which
can easily be deduced from the <owner> pointer as there is a 1:1 match.
diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c
index df4f920..b27f372 100644
--- a/src/ev_kqueue.c
+++ b/src/ev_kqueue.c
@@ -140,14 +140,14 @@
fd = kev[count].ident;
if (kev[count].filter == EVFILT_READ) {
if (FD_ISSET(fd, fd_evts[DIR_RD])) {
- if (fdtab[fd].state == FD_STCLOSE)
+ if (!fdtab[fd].owner)
continue;
fdtab[fd].ev |= FD_POLL_IN;
fdtab[fd].cb[DIR_RD].f(fd);
}
} else if (kev[count].filter == EVFILT_WRITE) {
if (FD_ISSET(fd, fd_evts[DIR_WR])) {
- if (fdtab[fd].state == FD_STCLOSE)
+ if (!fdtab[fd].owner)
continue;
fdtab[fd].ev |= FD_POLL_OUT;
fdtab[fd].cb[DIR_WR].f(fd);