]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Changed MAILBOX_OPEN_FAST meaning a bit. Don't use it where it's unnecessary.
authorTimo Sirainen <tss@iki.fi>
Tue, 14 Apr 2009 00:06:40 +0000 (20:06 -0400)
committerTimo Sirainen <tss@iki.fi>
Tue, 14 Apr 2009 00:06:40 +0000 (20:06 -0400)
--HG--
branch : HEAD

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

index 9af575263004333036b551a7ef79e8aaf4e716db..2b27608fe13171577563938034ca02baa3360742 100644 (file)
@@ -461,7 +461,7 @@ get_mailbox(struct client_command_context *cmd, const char *name)
                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;
index 97882cbccf5209312223b58029b0e015188ef7e0..3f0c8f8910fc4c48c6415edd21dc4a74c6f75ceb 100644 (file)
@@ -128,7 +128,6 @@ bool cmd_copy(struct client_command_context *cmd)
        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);
index 89874ee800c61552c09c65a56856c820c619392b..e431be36777f92bdea6d100ef919e8d57553af70 100644 (file)
@@ -78,7 +78,7 @@ mailbox_open_or_create_synced(struct mail_deliver_context *ctx,
        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;
 
index 52190696dce8ebddc75e1bfba0cdd4ec008f7ef8..4adf23e3b0a7a18b06f638086ecb7d16da37277b 100644 (file)
@@ -11,8 +11,7 @@ void index_storage_get_status(struct mailbox *box,
        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));
 
index 08371c72d789038c586789489811bc53020d5c14..d9ed0da9b244797123c6b67ca45f7dedaf72a867 100644 (file)
@@ -66,8 +66,7 @@ index_transaction_begin(struct mailbox *box,
        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)
index 06b662d22cc9b4bf4540e58a49fd0bdab523912f..8f84f7c320c96ecb598ec537ca245b4b998a9319 100644 (file)
@@ -28,8 +28,8 @@ enum mailbox_open_flags {
        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,
index 8c219164336a62fb447932f8f6528273b5e134cf..1297d25c85dd0a70aea8d1c867fa318168446262 100644 (file)
@@ -434,8 +434,8 @@ quota_mailbox_list_delete(struct mailbox_list *list, const char *name)
           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) {