Mercurial > dovecot > core-2.2
changeset 9101:2e20a1a9bcd4 HEAD
Changed MAILBOX_OPEN_FAST meaning a bit. Don't use it where it's unnecessary.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 13 Apr 2009 20:06:40 -0400 |
parents | be8d15cb98e7 |
children | 8be5ca07189f |
files | src/imap/cmd-append.c src/imap/cmd-copy.c src/lib-lda/mail-deliver.c src/lib-storage/index/index-status.c src/lib-storage/index/index-transaction.c src/lib-storage/mail-storage.h src/plugins/quota/quota-storage.c |
diffstat | 7 files changed, 8 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-append.c Mon Apr 13 19:20:55 2009 -0400 +++ b/src/imap/cmd-append.c Mon Apr 13 20:06:40 2009 -0400 @@ -461,7 +461,7 @@ return cmd->client->mailbox; box = mailbox_open(&storage, name, NULL, MAILBOX_OPEN_SAVEONLY | - MAILBOX_OPEN_FAST | MAILBOX_OPEN_KEEP_RECENT); + MAILBOX_OPEN_KEEP_RECENT); if (box == NULL) { client_send_storage_error(cmd, storage); return NULL;
--- a/src/imap/cmd-copy.c Mon Apr 13 19:20:55 2009 -0400 +++ b/src/imap/cmd-copy.c Mon Apr 13 20:06:40 2009 -0400 @@ -128,7 +128,6 @@ else { destbox = mailbox_open(&storage, mailbox, NULL, MAILBOX_OPEN_SAVEONLY | - MAILBOX_OPEN_FAST | MAILBOX_OPEN_KEEP_RECENT); if (destbox == NULL) { client_send_storage_error(cmd, storage);
--- a/src/lib-lda/mail-deliver.c Mon Apr 13 19:20:55 2009 -0400 +++ b/src/lib-lda/mail-deliver.c Mon Apr 13 20:06:40 2009 -0400 @@ -78,7 +78,7 @@ struct mail_namespace *ns; struct mailbox *box; enum mail_error error; - enum mailbox_open_flags open_flags = MAILBOX_OPEN_FAST | + enum mailbox_open_flags open_flags = MAILBOX_OPEN_KEEP_RECENT | MAILBOX_OPEN_SAVEONLY | MAILBOX_OPEN_POST_SESSION;
--- a/src/lib-storage/index/index-status.c Mon Apr 13 19:20:55 2009 -0400 +++ b/src/lib-storage/index/index-status.c Mon Apr 13 20:06:40 2009 -0400 @@ -11,8 +11,7 @@ struct index_mailbox *ibox = (struct index_mailbox *)box; const struct mail_index_header *hdr; - if (!box->opened) - index_storage_mailbox_open(ibox); + i_assert(box->opened); memset(status_r, 0, sizeof(struct mailbox_status));
--- a/src/lib-storage/index/index-transaction.c Mon Apr 13 19:20:55 2009 -0400 +++ b/src/lib-storage/index/index-transaction.c Mon Apr 13 20:06:40 2009 -0400 @@ -66,8 +66,7 @@ struct index_transaction_context *it; enum mail_index_transaction_flags trans_flags; - if (!box->opened) - index_storage_mailbox_open(ibox); + i_assert(box->opened); trans_flags = MAIL_INDEX_TRANSACTION_FLAG_AVOID_FLAG_UPDATES; if ((flags & MAILBOX_TRANSACTION_FLAG_HIDE) != 0)
--- a/src/lib-storage/mail-storage.h Mon Apr 13 19:20:55 2009 -0400 +++ b/src/lib-storage/mail-storage.h Mon Apr 13 20:06:40 2009 -0400 @@ -28,8 +28,8 @@ MAILBOX_OPEN_READONLY = 0x01, /* Only saving/copying mails to mailbox works. */ MAILBOX_OPEN_SAVEONLY = 0x02, - /* Any extra time consuming operations shouldn't be performed - (eg. when opening mailbox just for STATUS). */ + /* Delay opening index files (and possibly other files) until mailbox + is being synchronized. */ MAILBOX_OPEN_FAST = 0x04, /* Don't reset MAIL_RECENT flags when syncing */ MAILBOX_OPEN_KEEP_RECENT = 0x08,
--- a/src/plugins/quota/quota-storage.c Mon Apr 13 19:20:55 2009 -0400 +++ b/src/plugins/quota/quota-storage.c Mon Apr 13 20:06:40 2009 -0400 @@ -434,8 +434,8 @@ mailbox locked so that other processes can't mess up the quota calculations by adding/removing mails while we're doing this. */ storage = qlist->storage; - box = mailbox_open(&storage, name, NULL, MAILBOX_OPEN_FAST | - MAILBOX_OPEN_KEEP_RECENT | MAILBOX_OPEN_KEEP_LOCKED); + box = mailbox_open(&storage, name, NULL, MAILBOX_OPEN_KEEP_RECENT | + MAILBOX_OPEN_KEEP_LOCKED); if (box == NULL) { str = mail_storage_get_last_error(qlist->storage, &error); if (error != MAIL_ERROR_NOTPOSSIBLE) {