[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.35, 1.36

cras at procontrol.fi cras at procontrol.fi
Sat Jun 19 20:14:20 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv7010/lib-storage/index/mbox

Modified Files:
	mbox-sync.c 
Log Message:
New mails pointed to beginning of file.



Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- mbox-sync.c	19 Jun 2004 01:04:16 -0000	1.35
+++ mbox-sync.c	19 Jun 2004 17:14:18 -0000	1.36
@@ -466,8 +466,10 @@
 	const struct mbox_sync_mail *mails;
 	uint32_t extra_idx = ibox->mbox_extra_idx;
 	uint64_t offset;
+	size_t size;
 
-	mails = buffer_get_modifyable_data(mails_buf, NULL);
+	mails = buffer_get_modifyable_data(mails_buf, &size);
+	i_assert((seq2-seq1+1) * sizeof(*mails) == size);
 
 	for (; seq1 <= seq2; seq1++, mails++) {
 		if (mails->uid != 0) {
@@ -820,13 +822,12 @@
 					      sync_ctx->need_space_seq,
 					      sync_ctx->seq) < 0)
 				return -1;
-
-			update_from_offsets(sync_ctx->ibox, sync_ctx->t,
-					    sync_ctx->mails,
-					    sync_ctx->need_space_seq,
-					    sync_ctx->seq);
 		}
 
+		update_from_offsets(sync_ctx->ibox, sync_ctx->t,
+				    sync_ctx->mails,
+				    sync_ctx->need_space_seq, sync_ctx->seq);
+
 		sync_ctx->need_space_seq = 0;
 		buffer_set_used_size(sync_ctx->mails, 0);
 	}



More information about the dovecot-cvs mailing list