dovecot: Fixes to MAIL_INDEX_VIEW_SYNC_FLAG_FIX_INCONSISTENT han...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Nov 3 22:44:09 EET 2007
details: http://hg.dovecot.org/dovecot/rev/53173ab706a0
changeset: 6682:53173ab706a0
user: Timo Sirainen <tss at iki.fi>
date: Sat Nov 03 22:44:05 2007 +0200
description:
Fixes to MAIL_INDEX_VIEW_SYNC_FLAG_FIX_INCONSISTENT handling.
diffstat:
1 file changed, 10 insertions(+), 9 deletions(-)
src/lib-index/mail-index-view-sync.c | 19 ++++++++++---------
diffs (36 lines):
diff -r b502a4926298 -r 53173ab706a0 src/lib-index/mail-index-view-sync.c
--- a/src/lib-index/mail-index-view-sync.c Sat Nov 03 22:34:21 2007 +0200
+++ b/src/lib-index/mail-index-view-sync.c Sat Nov 03 22:44:05 2007 +0200
@@ -104,6 +104,9 @@ view_sync_set_log_view_range(struct mail
if (quick_sync) {
start_seq = end_seq;
start_offset = end_offset;
+ /* we'll just directly to the end */
+ view->log_file_head_seq = end_seq;
+ view->log_file_head_offset = end_offset;
} else {
start_seq = view->log_file_expunge_seq;
start_offset = view->log_file_expunge_offset;
@@ -284,15 +287,13 @@ int mail_index_view_sync_begin(struct ma
}
sync_expunges = (flags & MAIL_INDEX_VIEW_SYNC_FLAG_NOEXPUNGES) == 0;
- if (sync_expunges) {
- if (quick_sync)
- i_array_init(&expunges, 1);
- else {
- /* get list of all expunges first */
- if (view_sync_get_expunges(view, &expunges,
- &expunge_count) < 0)
- return -1;
- }
+ if (quick_sync) {
+ i_assert(sync_expunges);
+ i_array_init(&expunges, 1);
+ } else if (sync_expunges) {
+ /* get list of all expunges first */
+ if (view_sync_get_expunges(view, &expunges, &expunge_count) < 0)
+ return -1;
}
if (view_sync_set_log_view_range(view, sync_expunges, quick_sync,
More information about the dovecot-cvs
mailing list