[dovecot-cvs] dovecot/src/lib ioloop.c,1.39,1.40
tss at dovecot.org
tss at dovecot.org
Wed Feb 28 20:19:46 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv14805
Modified Files:
ioloop.c
Log Message:
If time moves backwards, kill ourself.
Index: ioloop.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- ioloop.c 15 Feb 2007 13:57:08 -0000 1.39
+++ ioloop.c 28 Feb 2007 20:19:42 -0000 1.40
@@ -219,6 +219,14 @@
if (gettimeofday(&ioloop_timeval, &ioloop_timezone) < 0)
i_fatal("gettimeofday(): %m");
+
+ if (ioloop_time > ioloop_timeval.tv_sec) {
+ i_fatal("Time just moved backwards (%s -> %s)! "
+ "This might cause a lot of problems, "
+ "so I'll just kill myself now.",
+ dec2str(ioloop_time), dec2str(ioloop_timeval.tv_sec));
+ }
+
ioloop_time = ioloop_timeval.tv_sec;
if (ioloop->timeouts == NULL || !ioloop->timeouts->run_now)
More information about the dovecot-cvs
mailing list