dovecot-2.2: timeout_add_short(1) may have caused infinite looping.

dovecot at dovecot.org dovecot at dovecot.org
Wed Feb 27 12:34:30 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/2bbec4dadcb6
changeset: 15987:2bbec4dadcb6
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Feb 27 12:34:18 2013 +0200
description:
timeout_add_short(1) may have caused infinite looping.

diffstat:

 src/lib/ioloop.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r f6377e089dee -r 2bbec4dadcb6 src/lib/ioloop.c
--- a/src/lib/ioloop.c	Wed Feb 27 12:34:00 2013 +0200
+++ b/src/lib/ioloop.c	Wed Feb 27 12:34:18 2013 +0200
@@ -193,7 +193,7 @@
 timeout_reset_timeval(struct timeout *timeout, struct timeval *tv_now)
 {
 	timeout_update_next(timeout, tv_now);
-	if (timeout->msecs == 0) {
+	if (timeout->msecs <= 1) {
 		/* if we came here from io_loop_handle_timeouts(),
 		   next_run must be larger than tv_now or we could go to
 		   infinite loop. +1000 to get 1 ms further, another +1000 to


More information about the dovecot-cvs mailing list