[dovecot-cvs] dovecot/src/lib-index mail-transaction-log.c, 1.111.2.17, 1.111.2.18

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


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

Modified Files:
      Tag: branch_1_0
	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.111.2.17
retrieving revision 1.111.2.18
diff -u -d -r1.111.2.17 -r1.111.2.18
--- mail-transaction-log.c	16 Mar 2007 15:44:55 -0000	1.111.2.17
+++ mail-transaction-log.c	16 Mar 2007 16:02:22 -0000	1.111.2.18
@@ -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