Mercurial > dovecot > core-2.2
changeset 580:a0eb55ddb5f0 HEAD
We did a full sync too often.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 04 Nov 2002 11:19:19 +0200 |
parents | e524da896d92 |
children | c97be611a109 |
files | src/lib-index/mbox/mbox-sync.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mbox/mbox-sync.c Mon Nov 04 09:11:32 2002 +0200 +++ b/src/lib-index/mbox/mbox-sync.c Mon Nov 04 11:19:19 2002 +0200 @@ -38,7 +38,7 @@ return 0; } - return offset; + return offset + 1; /* +1 for trailing \n */ } static int mbox_lock_and_sync_full(MailIndex *index, @@ -104,16 +104,18 @@ index->mbox_size = get_indexed_mbox_size(index); if (index->file_sync_stamp == 0 && - index->mbox_size == filesize+1) { + index->mbox_size == filesize) { /* just opened the mailbox, and the file size is same as we expected. don't bother checking it any - further. the +1 comes from the extra \n at end. */ + further. */ } else { if (changes != NULL) *changes = TRUE; if (!mbox_lock_and_sync_full(index, data_lock_type)) return FALSE; + + index->mbox_size = filesize; } index->file_sync_stamp = st.st_mtime;