[dovecot-cvs]
dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.119, 1.120
cras at dovecot.org
cras at dovecot.org
Tue Nov 2 02:03:58 EET 2004
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv12193
Modified Files:
mbox-sync.c
Log Message:
idx_seq wasn't properly set when we were seeking into UID which doesn't
exist anymore. this sometimes caused valid records to be deleted from index
which caused mbox sync errors.
Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- mbox-sync.c 1 Nov 2004 20:48:42 -0000 1.119
+++ mbox-sync.c 2 Nov 2004 00:03:56 -0000 1.120
@@ -730,10 +730,11 @@
static int
mbox_sync_seek_to_uid(struct mbox_sync_context *sync_ctx, uint32_t uid)
{
+ struct mail_index_view *sync_view = sync_ctx->sync_view;
uint32_t seq1, seq2;
uoff_t file_size;
- if (mail_index_lookup_uid_range(sync_ctx->sync_view, uid, (uint32_t)-1,
+ if (mail_index_lookup_uid_range(sync_view, uid, (uint32_t)-1,
&seq1, &seq2) < 0) {
mail_storage_set_index_error(sync_ctx->ibox);
return -1;
@@ -749,6 +750,8 @@
sync_ctx->ibox->path);
return -1;
}
+ sync_ctx->idx_seq =
+ mail_index_view_get_message_count(sync_view) + 1;
return 1;
}
More information about the dovecot-cvs
mailing list