[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c, 1.158, 1.159 mbox-sync.c, 1.193, 1.194
tss at dovecot.org
tss at dovecot.org
Sun Dec 10 13:01:39 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv1567/index/mbox
Modified Files:
mbox-storage.c mbox-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: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- mbox-storage.c 6 Dec 2006 15:08:31 -0000 1.158
+++ mbox-storage.c 10 Dec 2006 13:01:35 -0000 1.159
@@ -517,11 +517,8 @@
mbox->ibox.mail_vfuncs = &mbox_mail_vfuncs;
mbox->ibox.is_recent = mbox_mail_is_recent;
- if (index_storage_mailbox_init(&mbox->ibox, index, name, flags,
- want_memory_indexes(storage, path)) < 0) {
- /* the memory is already freed here, no need to deinit */
- return NULL;
- }
+ index_storage_mailbox_init(&mbox->ibox, index, name, flags,
+ want_memory_indexes(storage, path));
mbox->storage = storage;
mbox->mbox_fd = -1;
@@ -564,9 +561,6 @@
index = index_storage_alloc(index_dir, path, MBOX_INDEX_PREFIX);
mbox = mbox_alloc(storage, index, name, path, flags);
- if (mbox == NULL)
- return NULL;
-
mbox->path = p_strdup(mbox->ibox.box.pool, path);
if (access(path, R_OK|W_OK) < 0) {
Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -d -r1.193 -r1.194
--- mbox-sync.c 25 Nov 2006 22:17:45 -0000 1.193
+++ mbox-sync.c 10 Dec 2006 13:01:35 -0000 1.194
@@ -1798,10 +1798,8 @@
enum mbox_sync_flags mbox_sync_flags = 0;
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