changeset 5015:aa4ff7a9c3f7 HEAD

And now really fix the log rotation race.
author Timo Sirainen <tss@iki.fi>
date Wed, 17 Jan 2007 00:39:49 +0200
parents 59b04ed146a9
children 874dede81cc1
files src/lib-index/mail-transaction-log.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log.c	Wed Jan 17 00:00:18 2007 +0200
+++ b/src/lib-index/mail-transaction-log.c	Wed Jan 17 00:39:49 2007 +0200
@@ -545,7 +545,10 @@
 	}
 
 	if (lock) {
-		if (mail_transaction_log_file_lock(file) < 0)
+		file->fd = new_fd;
+		ret = mail_transaction_log_file_lock(file);
+		file->fd = -1;
+		if (ret < 0)
 			return -1;
 	}