[dovecot-cvs] dovecot/src/lib-index mail-transaction-log.c, 1.56, 1.57

cras at dovecot.org cras at dovecot.org
Sun Sep 12 00:54:17 EEST 2004


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

Modified Files:
	mail-transaction-log.c 
Log Message:
Don't rotate log file if it's not fully synced



Index: mail-transaction-log.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- mail-transaction-log.c	11 Sep 2004 17:26:24 -0000	1.56
+++ mail-transaction-log.c	11 Sep 2004 21:54:15 -0000	1.57
@@ -1263,10 +1263,10 @@
 	if (log->head->sync_offset > MAIL_TRANSACTION_LOG_ROTATE_SIZE &&
 	    log->head->last_mtime <
 	    ioloop_time - MAIL_TRANSACTION_LOG_ROTATE_MIN_TIME) {
-		/* we might want to rotate, but check first that head file
-		   sequence matches the one in index header, ie. we have
-		   everything synced in index. */
-		if (log->head->hdr.file_seq == idx_hdr.log_file_seq) {
+		/* we might want to rotate, but check first that everything is
+		   synced in index. */
+		if (log->head->hdr.file_seq == idx_hdr.log_file_seq &&
+		    log->head->sync_offset == idx_hdr.log_file_offset) {
 			if (mail_transaction_log_rotate(log, TRUE) < 0) {
 				/* that didn't work. well, try to continue
 				   anyway */



More information about the dovecot-cvs mailing list