dovecot: Don't crash if we couldn't create transaction log.

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 27 20:18:41 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/7373240c3d1d
changeset: 6628:7373240c3d1d
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Oct 27 20:18:37 2007 +0300
description:
Don't crash if we couldn't create transaction log.

diffstat:

1 file changed, 6 insertions(+)
src/lib-index/mail-transaction-log.c |    6 ++++++

diffs (18 lines):

diff -r 7124f607fb1b -r 7373240c3d1d src/lib-index/mail-transaction-log.c
--- a/src/lib-index/mail-transaction-log.c	Sat Oct 27 20:07:44 2007 +0300
+++ b/src/lib-index/mail-transaction-log.c	Sat Oct 27 20:18:37 2007 +0300
@@ -159,8 +159,14 @@ void mail_transaction_log_free(struct ma
 
 void mail_transaction_log_move_to_memory(struct mail_transaction_log *log)
 {
+	struct mail_transaction_log_file *file;
+
 	if (log->head != NULL)
 		mail_transaction_log_file_move_to_memory(log->head);
+	else {
+		file = mail_transaction_log_file_alloc_in_memory(log);
+		mail_transaction_log_set_head(log, file);
+	}
 }
 
 void mail_transaction_log_indexid_changed(struct mail_transaction_log *log)


More information about the dovecot-cvs mailing list