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_poll.c b/src/ev_poll.c
index 8f2e1d9..6351a72 100644
--- a/src/ev_poll.c
+++ b/src/ev_poll.c
@@ -160,14 +160,14 @@
status--;
if (FD_ISSET(fd, fd_evts[DIR_RD])) {
- if (fdtab[fd].state == FD_STCLOSE)
+ if (!fdtab[fd].owner)
continue;
if (fdtab[fd].ev & (FD_POLL_IN|FD_POLL_HUP|FD_POLL_ERR))
fdtab[fd].cb[DIR_RD].f(fd);
}
if (FD_ISSET(fd, fd_evts[DIR_WR])) {
- if (fdtab[fd].state == FD_STCLOSE)
+ if (!fdtab[fd].owner)
continue;
if (fdtab[fd].ev & (FD_POLL_OUT|FD_POLL_ERR|FD_POLL_HUP))
fdtab[fd].cb[DIR_WR].f(fd);