changeset 6260:b238257f724c HEAD

If mailbox has transactions open while it's tried to be closed, die here instead of assert-crash later.
author Timo Sirainen <tss@iki.fi>
date Fri, 10 Aug 2007 14:53:51 +0300
parents f2b00d3996df
children 3c46b1c5121a
files src/lib-storage/mail-storage.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/mail-storage.c	Fri Aug 10 14:41:55 2007 +0300
+++ b/src/lib-storage/mail-storage.c	Fri Aug 10 14:53:51 2007 +0300
@@ -456,6 +456,11 @@
 {
 	struct mailbox *box = *_box;
 
+	if (box->transaction_count != 0) {
+		i_panic("Trying to close mailbox %s with open transactions",
+			box->name);
+	}
+
 	*_box = NULL;
 	return box->v.close(box);
 }