From 0025f24f1ea38cdbdc0b724b101b4ed2c9477db1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 21 Apr 2009 19:47:36 +0200 Subject: [PATCH] Remove long defunct IO_NEWSOCK Chainsaw used this together with the notify callback to make the iop data type usable for sockets it listened on, so that io_select() could multiplex them along with the sockets used for actual I/O. io_select() became unused in Empire 2, and finally got removed in commit 875d72a0, v4.2.13. That made the IO_NEWSOCK and the notify callback defunct. The latter got removed in commit 7d5a6b81, v4.3.1. --- include/empio.h | 1 - src/lib/empthread/io.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/empio.h b/include/empio.h index 53a6ee1b6..360504779 100644 --- a/include/empio.h +++ b/include/empio.h @@ -37,7 +37,6 @@ #define IO_READ 0x1 #define IO_WRITE 0x2 -#define IO_NEWSOCK 0x4 #define IO_NBLOCK 0x8 #define IO_EOF 0x10 #define IO_ERROR 0x40 diff --git a/src/lib/empthread/io.c b/src/lib/empthread/io.c index 32aa9a026..13d75ad71 100644 --- a/src/lib/empthread/io.c +++ b/src/lib/empthread/io.c @@ -75,7 +75,7 @@ io_open(int fd, int flags, int bufsize, struct timeval timeout) { struct iop *iop; - flags = flags & (IO_READ | IO_WRITE | IO_NBLOCK | IO_NEWSOCK); + flags = flags & (IO_READ | IO_WRITE | IO_NBLOCK); if ((flags & (IO_READ | IO_WRITE)) == 0) return NULL; iop = malloc(sizeof(struct iop)); @@ -87,9 +87,9 @@ io_open(int fd, int flags, int bufsize, struct timeval timeout) iop->flags = 0; iop->input_timeout = timeout; iop->bufsize = bufsize; - if ((flags & IO_READ) && (flags & IO_NEWSOCK) == 0) + if (flags & IO_READ) iop->input = ioq_create(bufsize); - if ((flags & IO_WRITE) && (flags & IO_NEWSOCK) == 0) + if (flags & IO_WRITE) iop->output = ioq_create(bufsize); if (flags & IO_NBLOCK) io_noblocking(iop, 1); /* FIXME check success */ -- 2.43.0