[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.126, 1.127

cras at dovecot.org cras at dovecot.org
Mon Dec 13 02:24:29 EET 2004


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

Modified Files:
	mbox-sync.c 
Log Message:
A few extra asserts.



Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- mbox-sync.c	7 Dec 2004 20:26:00 -0000	1.126
+++ mbox-sync.c	13 Dec 2004 00:24:27 -0000	1.127
@@ -594,6 +594,7 @@
 
                         sync_ctx->space_diff = sync_ctx->expunged_space;
 			sync_ctx->expunged_space = 0;
+			i_assert(sync_ctx->space_diff < -mail_ctx->mail.space);
 
 			sync_ctx->need_space_seq--;
 			buffer_append(sync_ctx->mails, &mail, sizeof(mail));
@@ -629,6 +630,7 @@
 		   space_diff now consists of a negative "bytes needed" sum,
 		   plus the expunged space of this message. so it contains how
 		   many bytes of _extra_ space we have. */
+		i_assert(mail_ctx->mail.space >= sync_ctx->space_diff);
 		extra_space = MBOX_HEADER_PADDING *
 			(sync_ctx->seq - sync_ctx->need_space_seq + 1);
 		needed_space = mail_ctx->mail.space - sync_ctx->space_diff;



More information about the dovecot-cvs mailing list