[dovecot-cvs] dovecot/src/lib-index mail-transaction-log.c, 1.129, 1.130

tss at dovecot.org tss at dovecot.org
Fri Mar 16 18:02:28 EET 2007


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

Modified Files:
	mail-transaction-log.c 
Log Message:
When marking transaction log corrupted, set indexid=0 instead of version=0.
Version setting worked too, but indexid=0 makes it log a "marked corrupted"
error message.



Index: mail-transaction-log.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- mail-transaction-log.c	16 Mar 2007 15:44:59 -0000	1.129
+++ mail-transaction-log.c	16 Mar 2007 16:02:26 -0000	1.130
@@ -53,7 +53,9 @@
 	file->hdr.indexid = 0;
 	if (!MAIL_TRANSACTION_LOG_FILE_IN_MEMORY(file)) {
 		if (pwrite_full(file->fd, &file->hdr.indexid,
-				sizeof(file->hdr.indexid), 0) < 0) {
+				sizeof(file->hdr.indexid),
+				offsetof(struct mail_transaction_log_header,
+					 indexid)) < 0) {
 			mail_index_file_set_syscall_error(file->log->index,
 				file->filepath, "pwrite()");
 		}



More information about the dovecot-cvs mailing list