[dovecot-cvs] dovecot/src/lib-index mail-cache-transaction.c, 1.26, 1.27

cras at dovecot.org cras at dovecot.org
Sat Sep 11 19:18:15 EEST 2004


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv13909

Modified Files:
	mail-cache-transaction.c 
Log Message:
extra asserts



Index: mail-cache-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache-transaction.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- mail-cache-transaction.c	11 Sep 2004 15:40:22 -0000	1.26
+++ mail-cache-transaction.c	11 Sep 2004 16:18:12 -0000	1.27
@@ -305,6 +305,7 @@
 
 	/* check again - locking might have reopened the cache file */
 	if (ctx->reserved_space != 0) {
+		i_assert(ctx->cache_file_seq == ctx->cache->hdr->file_seq);
 		mail_cache_free_space(ctx->cache, ctx->reserved_space_offset,
 				      ctx->reserved_space);
 	}
@@ -425,6 +426,7 @@
 		}
 
 		/* write it to file */
+		i_assert(ctx->cache_file_seq == cache->hdr->file_seq);
 		if (pwrite_full(cache->fd, rec, max_size, write_offset) < 0) {
 			mail_cache_set_syscall_error(cache, "pwrite_full()");
 			return -1;



More information about the dovecot-cvs mailing list