[dovecot-cvs] dovecot: Log a warning if filesystem's clock is +-30 different f...
dovecot at dovecot.org
dovecot at dovecot.org
Fri May 25 18:16:35 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/3c026711c35b
changeset: 5663:3c026711c35b
user: Timo Sirainen <tss at iki.fi>
date: Fri May 25 18:16:27 2007 +0300
description:
Log a warning if filesystem's clock is +-30 different from the system clock
(fix the previous wrong check).
diffstat:
1 file changed, 3 insertions(+), 5 deletions(-)
src/lib/file-dotlock.c | 8 +++-----
diffs (19 lines):
diff -r fdc30be3b5e5 -r 3c026711c35b src/lib/file-dotlock.c
--- a/src/lib/file-dotlock.c Fri May 25 18:10:47 2007 +0300
+++ b/src/lib/file-dotlock.c Fri May 25 18:16:27 2007 +0300
@@ -452,12 +452,10 @@ static int dotlock_create(const char *pa
dotlock->lock_time = now;
lock_info.fd = -1;
- if (st.st_ctime < now)
- now = time(NULL);
- if (st.st_ctime < now) {
+ if (st.st_ctime + 60 < now || st.st_ctime - 60 > now) {
i_warning("Created dotlock file's timestamp is "
- "smaller than current time "
- "(%s < %s): %s", dec2str(st.st_ctime),
+ "different than current time "
+ "(%s vs %s): %s", dec2str(st.st_ctime),
dec2str(now), path);
}
}
More information about the dovecot-cvs
mailing list