[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-storage.c, 1.136, 1.137 maildir-sync.c, 1.85, 1.86

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


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

Modified Files:
	maildir-storage.c maildir-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: maildir-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.c,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- maildir-storage.c	6 Dec 2006 15:08:30 -0000	1.136
+++ maildir-storage.c	10 Dec 2006 13:01:30 -0000	1.137
@@ -418,11 +418,7 @@
 	mbox->ibox.mail_vfuncs = &maildir_mail_vfuncs;
 	mbox->ibox.is_recent = maildir_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);
 
 	mbox->storage = storage;
 	mbox->path = p_strdup(pool, path);

Index: maildir-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-sync.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- maildir-sync.c	25 Nov 2006 22:17:42 -0000	1.85
+++ maildir-sync.c	10 Dec 2006 13:01:30 -0000	1.86
@@ -1397,10 +1397,8 @@
 	struct maildir_sync_context *ctx;
 	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