dovecot-2.0: ioloop-select: IO_ERROR wasn't really working.
dovecot at dovecot.org
dovecot at dovecot.org
Sat Mar 13 15:29:43 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/f2b9387ba047
changeset: 10891:f2b9387ba047
user: Timo Sirainen <tss at iki.fi>
date: Sat Mar 13 15:25:44 2010 +0200
description:
ioloop-select: IO_ERROR wasn't really working.
diffstat:
src/lib/ioloop-select.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r 6acd45009331 -r f2b9387ba047 src/lib/ioloop-select.c
--- a/src/lib/ioloop-select.c Sat Mar 13 15:13:03 2010 +0200
+++ b/src/lib/ioloop-select.c Sat Mar 13 15:25:44 2010 +0200
@@ -65,9 +65,9 @@
if (fd >= FD_SETSIZE)
i_fatal("fd %d too large for select()", fd);
- if (condition & IO_READ)
+ if ((condition & (IO_READ | IO_ERROR)) != 0)
FD_SET(fd, &ctx->read_fds);
- if (condition & IO_WRITE)
+ if ((condition & IO_WRITE) != 0)
FD_SET(fd, &ctx->write_fds);
FD_SET(fd, &ctx->except_fds);
@@ -83,9 +83,9 @@
i_assert(fd >= 0 && fd < FD_SETSIZE);
- if (condition & IO_READ)
+ if ((condition & (IO_READ | IO_ERROR)) != 0)
FD_CLR(fd, &ctx->read_fds);
- if (condition & IO_WRITE)
+ if ((condition & IO_WRITE) != 0)
FD_CLR(fd, &ctx->write_fds);
if (!FD_ISSET(fd, &ctx->read_fds) && !FD_ISSET(fd, &ctx->write_fds)) {
@@ -99,7 +99,7 @@
}
#define io_check_condition(ctx, fd, cond) \
- ((FD_ISSET((fd), &(ctx)->tmp_read_fds) && ((cond) & IO_READ)) || \
+ ((FD_ISSET((fd), &(ctx)->tmp_read_fds) && ((cond) & (IO_READ|IO_ERROR))) || \
(FD_ISSET((fd), &(ctx)->tmp_write_fds) && ((cond) & IO_WRITE)) || \
(FD_ISSET((fd), &(ctx)->tmp_except_fds)))
More information about the dovecot-cvs
mailing list