dovecot: mail_index_move_to_memory(): Don't log an error if inde...

dovecot at dovecot.org dovecot at dovecot.org
Sun Jul 15 15:30:04 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/8da2881df0dc
changeset: 6022:8da2881df0dc
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jul 15 15:27:58 2007 +0300
description:
mail_index_move_to_memory(): Don't log an error if index fd is already closed

diffstat:

1 file changed, 5 insertions(+), 4 deletions(-)
src/lib-index/mail-index.c |    9 +++++----

diffs (19 lines):

diff -r f40d16eed722 -r 8da2881df0dc src/lib-index/mail-index.c
--- a/src/lib-index/mail-index.c	Sun Jul 15 14:44:23 2007 +0300
+++ b/src/lib-index/mail-index.c	Sun Jul 15 15:27:58 2007 +0300
@@ -665,10 +665,11 @@ int mail_index_move_to_memory(struct mai
 	if (index->file_lock != NULL)
 		file_lock_free(&index->file_lock);
 
-	/* close the index file. */
-	if (close(index->fd) < 0)
-		mail_index_set_syscall_error(index, "close()");
-	index->fd = -1;
+	if (index->fd != -1) {
+		if (close(index->fd) < 0)
+			mail_index_set_syscall_error(index, "close()");
+		index->fd = -1;
+	}
 	return 0;
 }
 


More information about the dovecot-cvs mailing list