MINOR: fd: add a new I/O handler to fdtab
This one will eventually replace both cb[] handlers. At the moment it
is not used yet.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index ddc8269..41a31b8 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -476,10 +476,12 @@
if ((si->ob->flags & BF_OUT_EMPTY) || si->send_proxy_ofs) {
fdtab[fd].cb[DIR_RD].f = tcp_connect_read;
fdtab[fd].cb[DIR_WR].f = tcp_connect_write;
+ fdtab[fd].iocb = NULL;
}
else {
fdtab[fd].cb[DIR_RD].f = si_data(si)->read;
fdtab[fd].cb[DIR_WR].f = si_data(si)->write;
+ fdtab[fd].iocb = NULL;
}
fd_insert(fd);
@@ -821,6 +823,7 @@
fdtab[fd].flags = FD_FL_TCP | ((listener->options & LI_O_NOLINGER) ? FD_FL_TCP_NOLING : 0);
fdtab[fd].cb[DIR_RD].f = listener->proto->accept;
fdtab[fd].cb[DIR_WR].f = NULL; /* never called */
+ fdtab[fd].iocb = NULL;
fd_insert(fd);
tcp_return: