dovecot: Another fix for io_loop_get_wait_time()
dovecot at dovecot.org
dovecot at dovecot.org
Sat Jan 12 10:59:29 EET 2008
details: http://hg.dovecot.org/dovecot/rev/5587fcd83636
changeset: 7154:5587fcd83636
user: Timo Sirainen <tss at iki.fi>
date: Sat Jan 12 10:59:25 2008 +0200
description:
Another fix for io_loop_get_wait_time()
diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
src/lib/ioloop.c | 3 ++-
diffs (17 lines):
diff -r 4ecc97c9ce12 -r 5587fcd83636 src/lib/ioloop.c
--- a/src/lib/ioloop.c Sat Jan 12 10:49:04 2008 +0200
+++ b/src/lib/ioloop.c Sat Jan 12 10:59:25 2008 +0200
@@ -179,11 +179,12 @@ static int timeout_get_wait_time(struct
/* round wait times up to next millisecond */
ret = tv_r->tv_sec * 1000 + (tv_r->tv_usec + 999) / 1000;
- if (ret < 0) {
+ if (ret <= 0) {
tv_r->tv_sec = 0;
tv_r->tv_usec = 0;
return 0;
}
+ i_assert(tv_r->tv_sec >= 0 && tv_r->tv_usec >= 0);
return ret;
}
More information about the dovecot-cvs
mailing list