[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.65,
1.66
cras at dovecot.org
cras at dovecot.org
Sat Jul 31 03:48:11 EEST 2004
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c,
1.20, 1.21 mbox-sync-private.h, 1.25, 1.26 mbox-sync-rewrite.c,
1.26, 1.27
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.h,
1.26, 1.27 mbox-sync-update.c, 1.20, 1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv25721/lib-storage/index/mbox
Modified Files:
mbox-sync.c
Log Message:
Fix rewriting pseudo header when it needs to grow.
Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- mbox-sync.c 30 Jul 2004 23:32:27 -0000 1.65
+++ mbox-sync.c 31 Jul 2004 00:48:09 -0000 1.66
@@ -491,14 +491,15 @@
idx = 0;
idx_seq = sync_ctx->need_space_idx_seq;
if (idx_seq == 0) {
+ /* pseudo-header, skip it */
idx++; idx_seq++;
}
- for (; idx < size; idx++, idx_seq++, mails++) {
- if (mails->uid == 0)
+ for (; idx < size; idx++, idx_seq++) {
+ if (mails[idx].uid == 0)
continue;
- offset = mails->from_offset;
+ offset = mails[idx].from_offset;
mail_index_update_extra_rec(sync_ctx->t, idx_seq, extra_idx,
&offset);
}
@@ -567,7 +568,8 @@
if (ret == 0 && sync_ctx->need_space_seq == 0) {
/* first mail with no space to write it */
sync_ctx->need_space_seq = sync_ctx->seq;
- sync_ctx->need_space_idx_seq = sync_ctx->idx_seq;
+ sync_ctx->need_space_idx_seq =
+ mail_ctx->pseudo ? 0 : sync_ctx->idx_seq;
sync_ctx->space_diff = 0;
if (sync_ctx->expunged_space > 0) {
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c,
1.20, 1.21 mbox-sync-private.h, 1.25, 1.26 mbox-sync-rewrite.c,
1.26, 1.27
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.h,
1.26, 1.27 mbox-sync-update.c, 1.20, 1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list