[dovecot-cvs] dovecot/src/lib-index mail-index.c,1.208,1.209

cras at dovecot.org cras at dovecot.org
Sun Sep 18 18:40:32 EEST 2005


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

Modified Files:
	mail-index.c 
Log Message:
When creating a new index file, mark its log offsets so that the possibly
existing log file is completely synced. This caused marking index to be
corrupted to be quite useless since the same problem was again brought back
from the .log file.



Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -d -r1.208 -r1.209
--- mail-index.c	27 Aug 2005 12:41:21 -0000	1.208
+++ mail-index.c	18 Sep 2005 15:40:30 -0000	1.209
@@ -1278,6 +1278,11 @@
 		return ret < 0 ? -1 : 0;
 	}
 
+	/* mark the existing log file as synced */
+	hdr->log_file_seq = seq;
+	hdr->log_file_int_offset = offset;
+	hdr->log_file_ext_offset = offset;
+
 	/* create it fully in index.tmp first */
 	index->fd = mail_index_create_tmp_file(index, &path);
 	if (index->fd == -1)



More information about the dovecot-cvs mailing list