]> git.pond.sub.org Git - empserver/commitdiff
Remove long defunct IO_NEWSOCK
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 21 Apr 2009 17:47:36 +0000 (19:47 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 19 Jul 2009 18:11:52 +0000 (14:11 -0400)
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
src/lib/empthread/io.c

index 53a6ee1b6283dbd67469f14f57752f057f592972..36050477916d9a1cc1d98c7e559b7ef379856395 100644 (file)
@@ -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
index 32aa9a02682b60890a800bfed4e93e7dd51ddffe..13d75ad710f501510b174490a1161ac4722ae402 100644 (file)
@@ -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 */