dovecot-2.2: liblib: Added assert-check to epoll code to make su...

dovecot at dovecot.org dovecot at dovecot.org
Mon Nov 26 23:08:16 EET 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/22cfb7b347a8
changeset: 15401:22cfb7b347a8
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Nov 26 23:06:24 2012 +0200
description:
liblib: Added assert-check to epoll code to make sure we don't wait infinitely with no events.

diffstat:

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

diffs (14 lines):

diff -r 5552ac605201 -r 22cfb7b347a8 src/lib/ioloop-epoll.c
--- a/src/lib/ioloop-epoll.c	Mon Nov 26 23:03:09 2012 +0200
+++ b/src/lib/ioloop-epoll.c	Mon Nov 26 23:06:24 2012 +0200
@@ -179,8 +179,8 @@
 	} else {
 		/* no I/Os, but we should have some timeouts.
 		   just wait for them. */
-		if (msecs > 0)
-			usleep(msecs*1000);
+		i_assert(msecs >= 0);
+		usleep(msecs*1000);
 		ret = 0;
 	}
 


More information about the dovecot-cvs mailing list