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.
This commit is contained in:
Markus Armbruster 2009-04-21 19:47:36 +02:00
parent 3ce0cea94c
commit 0025f24f1e
2 changed files with 3 additions and 4 deletions

View file

@ -37,7 +37,6 @@
#define IO_READ 0x1 #define IO_READ 0x1
#define IO_WRITE 0x2 #define IO_WRITE 0x2
#define IO_NEWSOCK 0x4
#define IO_NBLOCK 0x8 #define IO_NBLOCK 0x8
#define IO_EOF 0x10 #define IO_EOF 0x10
#define IO_ERROR 0x40 #define IO_ERROR 0x40

View file

@ -75,7 +75,7 @@ io_open(int fd, int flags, int bufsize, struct timeval timeout)
{ {
struct iop *iop; 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) if ((flags & (IO_READ | IO_WRITE)) == 0)
return NULL; return NULL;
iop = malloc(sizeof(struct iop)); iop = malloc(sizeof(struct iop));
@ -87,9 +87,9 @@ io_open(int fd, int flags, int bufsize, struct timeval timeout)
iop->flags = 0; iop->flags = 0;
iop->input_timeout = timeout; iop->input_timeout = timeout;
iop->bufsize = bufsize; iop->bufsize = bufsize;
if ((flags & IO_READ) && (flags & IO_NEWSOCK) == 0) if (flags & IO_READ)
iop->input = ioq_create(bufsize); iop->input = ioq_create(bufsize);
if ((flags & IO_WRITE) && (flags & IO_NEWSOCK) == 0) if (flags & IO_WRITE)
iop->output = ioq_create(bufsize); iop->output = ioq_create(bufsize);
if (flags & IO_NBLOCK) if (flags & IO_NBLOCK)
io_noblocking(iop, 1); /* FIXME check success */ io_noblocking(iop, 1); /* FIXME check success */