dovecot-1.1: mbox: Fixed assert-crash with pop3_lock_session=yes

dovecot at dovecot.org dovecot at dovecot.org
Thu Jan 8 21:48:37 EET 2009


details:   http://hg.dovecot.org/dovecot-1.1/rev/5417c01fff5b
changeset: 8078:5417c01fff5b
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jan 08 14:46:47 2009 -0500
description:
mbox: Fixed assert-crash with pop3_lock_session=yes

diffstat:

1 file changed, 6 insertions(+), 2 deletions(-)
src/lib-storage/index/mbox/mbox-transaction.c |    8 ++++++--

diffs (18 lines):

diff -r 0041d055acac -r 5417c01fff5b src/lib-storage/index/mbox/mbox-transaction.c
--- a/src/lib-storage/index/mbox/mbox-transaction.c	Thu Jan 08 12:22:11 2009 -0500
+++ b/src/lib-storage/index/mbox/mbox-transaction.c	Thu Jan 08 14:46:47 2009 -0500
@@ -50,8 +50,12 @@ static int mbox_transaction_commit(struc
 		if (mbox_unlock(mbox, lock_id) < 0)
 			ret = -1;
 	}
-	i_assert(mbox->ibox.box.transaction_count > 0 ||
-		 mbox->mbox_lock_type == F_UNLCK);
+	if (mbox->mbox_global_lock_id == 0) {
+		i_assert(mbox->ibox.box.transaction_count > 0 ||
+			 mbox->mbox_lock_type == F_UNLCK);
+	} else {
+		i_assert(mbox->mbox_lock_type == F_WRLCK);
+	}
 	return ret;
 }
 


More information about the dovecot-cvs mailing list