[dovecot-cvs] dovecot/src/lib-index mail-transaction-log.c, 1.123, 1.124

tss at dovecot.org tss at dovecot.org
Wed Mar 7 02:42:34 EET 2007


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

Modified Files:
	mail-transaction-log.c 
Log Message:
Don't crash when rotating locked in-memory log file.



Index: mail-transaction-log.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- mail-transaction-log.c	6 Mar 2007 14:28:34 -0000	1.123
+++ mail-transaction-log.c	7 Mar 2007 00:42:32 -0000	1.124
@@ -879,9 +879,10 @@
 
 	i_assert(log->head->locked);
 
-	if (MAIL_INDEX_IS_IN_MEMORY(log->index))
+	if (MAIL_INDEX_IS_IN_MEMORY(log->index)) {
 		file = mail_transaction_log_file_alloc_in_memory(log);
-	else {
+		file->locked = TRUE;
+	} else {
                 /* we're locked, we shouldn't need to worry about ESTALE
                    problems in here. */
 		if (fstat(log->head->fd, &st) < 0) {



More information about the dovecot-cvs mailing list