[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-storage.c, 1.27, 1.28 dbox-sync.c, 1.24, 1.25

tss at dovecot.org tss at dovecot.org
Sun Dec 10 13:01:31 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/dbox
In directory talvi:/tmp/cvs-serv1567/index/dbox

Modified Files:
	dbox-storage.c dbox-sync.c 
Log Message:
Make sure the mailbox is opened when transaction is started (fixes deliver).
Also did some other API cleanups, mailbox index opening can't fail anymore.



Index: dbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-storage.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- dbox-storage.c	6 Dec 2006 15:08:29 -0000	1.27
+++ dbox-storage.c	10 Dec 2006 13:01:26 -0000	1.28
@@ -237,11 +237,7 @@
 	mbox->ibox.mail_vfuncs = &dbox_mail_vfuncs;
 	mbox->ibox.is_recent = dbox_is_recent;
 
-	if (index_storage_mailbox_init(&mbox->ibox, index, name, flags,
-				       FALSE) < 0) {
-		/* the memory was already freed */
-		return NULL;
-	}
+	index_storage_mailbox_init(&mbox->ibox, index, name, flags, FALSE);
 
 	value = getenv("DBOX_ROTATE_SIZE");
 	if (value != NULL)

Index: dbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-sync.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- dbox-sync.c	25 Nov 2006 22:17:42 -0000	1.24
+++ dbox-sync.c	10 Dec 2006 13:01:26 -0000	1.25
@@ -593,10 +593,8 @@
 	struct dbox_mailbox *mbox = (struct dbox_mailbox *)box;
 	int ret = 0;
 
-	if (!box->opened) {
-		if (index_storage_mailbox_open(&mbox->ibox) < 0)
-			return index_mailbox_sync_init(box, 0, TRUE);
-	}
+	if (!box->opened)
+		index_storage_mailbox_open(&mbox->ibox);
 
 	if ((flags & MAILBOX_SYNC_FLAG_FAST) == 0 ||
 	    mbox->ibox.sync_last_check + MAILBOX_FULL_SYNC_INTERVAL <=



More information about the dovecot-cvs mailing list