[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.47,
1.48
cras at procontrol.fi
cras at procontrol.fi
Sun Jun 20 23:25:58 EEST 2004
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c,
1.14, 1.15 mbox-sync-private.h, 1.18, 1.19 mbox-sync-rewrite.c,
1.20, 1.21 mbox-sync.c, 1.46, 1.47
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.48,
1.49
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv18561/lib-storage/index/mbox
Modified Files:
mbox-sync.c
Log Message:
expunge everything in index after missing/invalid X-UID
Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- mbox-sync.c 20 Jun 2004 13:48:34 -0000 1.47
+++ mbox-sync.c 20 Jun 2004 20:25:56 -0000 1.48
@@ -731,6 +731,8 @@
sync_ctx->dest_first_mail = TRUE;
}
+ messages_count = mail_index_view_get_message_count(sync_ctx->sync_view);
+
while ((ret = mbox_sync_read_next_mail(sync_ctx, mail_ctx)) > 0) {
uid = mail_ctx->mail.uid;
@@ -751,7 +753,16 @@
}
}
if (uid == 0) {
- /* missing/broken X-UID */
+ /* missing/broken X-UID. all the rest of the mails
+ need new UIDs. */
+ if (sync_ctx->idx_seq > 0) {
+ mail_index_expunge(sync_ctx->t,
+ sync_ctx->idx_seq++);
+ }
+ while (sync_ctx->idx_seq < messages_count) {
+ mail_index_expunge(sync_ctx->t,
+ ++sync_ctx->idx_seq);
+ }
mail_ctx->need_rewrite = TRUE;
mail_ctx->mail.uid = sync_ctx->next_uid++;
sync_ctx->prev_msg_uid = mail_ctx->mail.uid;
@@ -815,8 +826,6 @@
if (istream_raw_mbox_is_eof(sync_ctx->input)) {
/* rest of the messages in index don't exist -> expunge them */
- messages_count =
- mail_index_view_get_message_count(sync_ctx->sync_view);
while (sync_ctx->idx_seq < messages_count)
mail_index_expunge(sync_ctx->t, ++sync_ctx->idx_seq);
}
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c,
1.14, 1.15 mbox-sync-private.h, 1.18, 1.19 mbox-sync-rewrite.c,
1.20, 1.21 mbox-sync.c, 1.46, 1.47
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.48,
1.49
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list