dovecot: Make sure the file_seq always grows.

dovecot at dovecot.org dovecot at dovecot.org
Sat Jul 14 23:19:38 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/8964d1b2b78b
changeset: 5994:8964d1b2b78b
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Jul 14 23:19:30 2007 +0300
description:
Make sure the file_seq always grows.

diffstat:

1 file changed, 4 insertions(+)
src/lib-index/mail-cache-compress.c |    4 ++++

diffs (14 lines):

diff -r c66c80b23f95 -r 8964d1b2b78b src/lib-index/mail-cache-compress.c
--- a/src/lib-index/mail-cache-compress.c	Sat Jul 14 23:19:15 2007 +0300
+++ b/src/lib-index/mail-cache-compress.c	Sat Jul 14 23:19:30 2007 +0300
@@ -96,6 +96,10 @@ get_next_file_seq(struct mail_cache *cac
 
 	ext = mail_index_view_get_ext(view, cache->ext_id);
 	file_seq = ext != NULL ? ext->reset_id + 1 : (uint32_t)ioloop_time;
+
+	if (cache->hdr != NULL && file_seq <= cache->hdr->file_seq)
+		file_seq = cache->hdr->file_seq + 1;
+
 	return file_seq != 0 ? file_seq : 1;
 }
 


More information about the dovecot-cvs mailing list