Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5662:fdc30be3b5e5 HEAD
If created dotlock file's ctime is smaller than the current time (NFS
server's clock is wrong), log a warning.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 25 May 2007 18:10:47 +0300 |
parents | f18a7fd8ac9a |
children | 3c026711c35b |
files | src/lib/file-dotlock.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/file-dotlock.c Thu May 24 20:21:29 2007 +0300 +++ b/src/lib/file-dotlock.c Fri May 25 18:10:47 2007 +0300 @@ -451,6 +451,15 @@ dotlock->fd = lock_info.fd; dotlock->lock_time = now; lock_info.fd = -1; + + if (st.st_ctime < now) + now = time(NULL); + if (st.st_ctime < now) { + i_warning("Created dotlock file's timestamp is " + "smaller than current time " + "(%s < %s): %s", dec2str(st.st_ctime), + dec2str(now), path); + } } }