dovecot-2.2: lib: ioloop-epoll didn't correctly check if there w...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jul 11 08:16:16 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/410f263e6fc3
changeset: 17623:410f263e6fc3
user: Timo Sirainen <tss at iki.fi>
date: Fri Jul 11 11:14:41 2014 +0300
description:
lib: ioloop-epoll didn't correctly check if there were any IO events.
Alternatively we could have checked for array_count(&ctx->events) >
ctx->deleted_count, but this code is a bit more understandable.
This change doesn't actually fix any proper bugs, it just causes the process
to crash instead of going to infinite wait loop.
diffstat:
src/lib/ioloop-epoll.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r abc7ebe1dad9 -r 410f263e6fc3 src/lib/ioloop-epoll.c
--- a/src/lib/ioloop-epoll.c Fri Jul 11 00:20:41 2014 +0300
+++ b/src/lib/ioloop-epoll.c Fri Jul 11 11:14:41 2014 +0300
@@ -177,7 +177,7 @@
msecs = io_loop_get_wait_time(ioloop, &tv);
events = array_get_modifiable(&ctx->events, &events_count);
- if (events_count > 0) {
+ if (ioloop->io_files != NULL) {
ret = epoll_wait(ctx->epfd, events, events_count, msecs);
if (ret < 0 && errno != EINTR)
i_fatal("epoll_wait(): %m");
More information about the dovecot-cvs
mailing list