]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Rename index_list_open_view() to mailbox_list_index_view_open()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 9 Jul 2019 14:12:28 +0000 (17:12 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 10 Jul 2019 06:48:24 +0000 (06:48 +0000)
In preparation for making the function public.

src/lib-storage/list/mailbox-list-index-status.c

index 659e0a80e8552643965c81e9b7908dc7a1d9dd7e..060c3a70fb94b9f8f52815422d9987dac015ec33 100644 (file)
@@ -28,8 +28,8 @@ struct index_list_storage_module index_list_storage_module =
        MODULE_CONTEXT_INIT(&mail_storage_module_register);
 
 static int
-index_list_open_view(struct mailbox *box, bool require_refreshed,
-                    struct mail_index_view **view_r, uint32_t *seq_r)
+mailbox_list_index_view_open(struct mailbox *box, bool require_refreshed,
+                            struct mail_index_view **view_r, uint32_t *seq_r)
 {
        struct mailbox_list_index *ilist = INDEX_LIST_CONTEXT_REQUIRE(box->list);
        struct mailbox_list_index_node *node;
@@ -96,7 +96,7 @@ index_list_exists(struct mailbox *box, bool auto_boxes,
        uint32_t seq;
        int ret;
 
-       if ((ret = index_list_open_view(box, FALSE, &view, &seq)) <= 0) {
+       if ((ret = mailbox_list_index_view_open(box, FALSE, &view, &seq)) <= 0) {
                /* failure / not found. fallback to the real storage check
                   just in case to see if the mailbox was just created. */
                return ibox->module_ctx.super.
@@ -203,7 +203,7 @@ index_list_get_cached_status(struct mailbox *box,
                return 0;
        }
 
-       if ((ret = index_list_open_view(box, TRUE, &view, &seq)) <= 0)
+       if ((ret = mailbox_list_index_view_open(box, TRUE, &view, &seq)) <= 0)
                return ret;
 
        ret = mailbox_list_index_status(box->list, view, seq, items,
@@ -240,7 +240,7 @@ index_list_get_cached_guid(struct mailbox *box, guid_128_t guid_r)
                return 0;
        }
 
-       if ((ret = index_list_open_view(box, FALSE, &view, &seq)) <= 0)
+       if ((ret = mailbox_list_index_view_open(box, FALSE, &view, &seq)) <= 0)
                return ret;
 
        ret = mailbox_list_index_status(box->list, view, seq, 0,
@@ -262,7 +262,7 @@ static int index_list_get_cached_vsize(struct mailbox *box, uoff_t *vsize_r)
 
        i_assert(!ilist->syncing);
 
-       if ((ret = index_list_open_view(box, TRUE, &view, &seq)) <= 0)
+       if ((ret = mailbox_list_index_view_open(box, TRUE, &view, &seq)) <= 0)
                return ret;
 
        ret = mailbox_list_index_status(box->list, view, seq,
@@ -297,7 +297,7 @@ index_list_get_cached_first_saved(struct mailbox *box,
 
        i_zero(first_saved_r);
 
-       if ((ret = index_list_open_view(box, TRUE, &view, &seq)) <= 0)
+       if ((ret = mailbox_list_index_view_open(box, TRUE, &view, &seq)) <= 0)
                return ret;
 
        mail_index_lookup_ext(view, seq, ilist->first_saved_ext_id,
@@ -715,7 +715,7 @@ void mailbox_list_index_update_mailbox_index(struct mailbox *box,
        i_zero(&changes);
        /* update the mailbox list index even if it has some other pending
           changes. */
-       if ((ret = index_list_open_view(box, FALSE, &list_view, &changes.seq)) <= 0)
+       if ((ret = mailbox_list_index_view_open(box, FALSE, &list_view, &changes.seq)) <= 0)
                return;
 
        guid_128_empty(mailbox_guid);