[dovecot-cvs] dovecot/src/lib-index mail-transaction-log-append.c, 1.3, 1.4

cras at dovecot.org cras at dovecot.org
Sat Mar 5 21:15:54 EET 2005


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

Modified Files:
	mail-transaction-log-append.c 
Log Message:
When rotating log, we locked index and tried to use its header. We didn't
call mail_index_map() however to update the header..



Index: mail-transaction-log-append.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log-append.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mail-transaction-log-append.c	5 Mar 2005 12:41:22 -0000	1.3
+++ mail-transaction-log-append.c	5 Mar 2005 19:15:52 -0000	1.4
@@ -353,6 +353,13 @@
 				mail_transaction_log_file_unlock(log->head);
 			return -1;
 		}
+		if (mail_index_map(index, FALSE) <= 0) {
+			mail_index_unlock(index, lock_id);
+			if (!log->index->log_locked)
+				mail_transaction_log_file_unlock(log->head);
+			return -1;
+		}
+
 		idx_hdr = *log->index->hdr;
 		mail_index_unlock(log->index, lock_id);
 



More information about the dovecot-cvs mailing list