changeset 2119:26dd9aca935e HEAD

fixes
author Timo Sirainen <tss@iki.fi>
date Mon, 14 Jun 2004 07:54:05 +0300
parents 11febaee5e9b
children f434ecc6ef83
files src/lib-storage/index/mbox/mbox-sync-rewrite.c src/lib-storage/index/mbox/mbox-sync.c
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync-rewrite.c	Mon Jun 14 07:30:32 2004 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync-rewrite.c	Mon Jun 14 07:54:05 2004 +0300
@@ -394,7 +394,7 @@
 				// FIXME: error handling
 				ret = -1;
 			}
-			mails[1].from_offset -= offset - end_offset;
+			mails[1].from_offset -= end_offset - start_offset;
 			idx++;
 
 			start_offset += offset - end_offset;
--- a/src/lib-storage/index/mbox/mbox-sync.c	Mon Jun 14 07:30:32 2004 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Mon Jun 14 07:54:05 2004 +0300
@@ -203,14 +203,18 @@
 		    struct mail_index_transaction *t, buffer_t *mails_buf,
 		    uint32_t seq1, uint32_t seq2)
 {
+	const struct mbox_sync_mail *mails;
 	uint32_t extra_idx = ibox->mbox_extra_idx;
-	const struct mbox_sync_mail *mails;
+	uint64_t offset;
 
 	mails = buffer_get_modifyable_data(mails_buf, NULL);
 
 	for (; seq1 <= seq2; seq1++, mails++) {
-		uint64_t offset = mails->from_offset;
-		mail_index_update_extra_rec(t, seq1, extra_idx, &offset);
+		if (mails->uid != 0) {
+			offset = mails->from_offset;
+			mail_index_update_extra_rec(t, seq1, extra_idx,
+						    &offset);
+		}
 	}
 }