[dovecot-cvs] dovecot/src/lib-storage/index/mbox
mbox-sync-rewrite.c, 1.47, 1.48
cras at dovecot.org
cras at dovecot.org
Fri Apr 22 23:31:31 EEST 2005
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv4149
Modified Files:
mbox-sync-rewrite.c
Log Message:
When first message was expunged we might have gotten "uid-last unexpectedly
lost" errors.
Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- mbox-sync-rewrite.c 8 Apr 2005 14:32:52 -0000 1.47
+++ mbox-sync-rewrite.c 22 Apr 2005 20:31:27 -0000 1.48
@@ -208,13 +208,14 @@
/* FIXME: see if we could remove X-Keywords header completely */
}
-static void mbox_sync_first_mail_written(struct mbox_sync_mail_context *ctx)
+static void mbox_sync_first_mail_written(struct mbox_sync_mail_context *ctx,
+ uoff_t hdr_offset)
{
/* we wrote the first mail. update the base_uid_last so we don't try
to update it later unneededly. also update last-uid offset. */
i_assert(ctx->last_uid_value_start_pos != 0);
- ctx->sync_ctx->base_uid_last_offset = ctx->hdr_offset +
+ ctx->sync_ctx->base_uid_last_offset = hdr_offset +
ctx->hdr_pos[MBOX_HDR_X_IMAPBASE] +
ctx->last_uid_value_start_pos;
ctx->sync_ctx->base_uid_last = ctx->sync_ctx->next_uid - 1;
@@ -288,7 +289,7 @@
}
if (sync_ctx->dest_first_mail)
- mbox_sync_first_mail_written(ctx);
+ mbox_sync_first_mail_written(ctx, ctx->hdr_offset + move_diff);
i_stream_sync(sync_ctx->input);
return 1;
@@ -388,7 +389,7 @@
}
if (sync_ctx->dest_first_mail) {
- mbox_sync_first_mail_written(&mail_ctx);
+ mbox_sync_first_mail_written(&mail_ctx, dest_offset);
sync_ctx->dest_first_mail = FALSE;
}
More information about the dovecot-cvs
mailing list