]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Don't call mailbox_vfuncs.list_index_has_changed() in data stack frame
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 20 Aug 2021 16:09:17 +0000 (19:09 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 13 Dec 2021 13:22:20 +0000 (13:22 +0000)
This will be required by the next change.

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

index def8f3c598f59d8ed35336f2f24b04ee9103d010..be8b265d36c30d9a5083d579d8f9cf53a57d9573 100644 (file)
@@ -215,7 +215,9 @@ mailbox_list_index_iter_next(struct mailbox_list_iterate_context *_ctx)
 
        /* listing mailboxes from index */
        while (ctx->next_node != NULL) {
-               mailbox_list_index_update_info(ctx);
+               T_BEGIN {
+                       mailbox_list_index_update_info(ctx);
+               } T_END;
                match = imap_match(_ctx->glob, ctx->info.vname);
 
                follow_children = (match & (IMAP_MATCH_YES |
index 1f798bf0229631b3ac6c6679bfac780d0e6e38de..c4d6d3c85e2016d422eb08c2c2a849865cc6911c 100644 (file)
@@ -811,10 +811,10 @@ void mailbox_list_index_status_set_info_flags(struct mailbox *box, uint32_t uid,
        if (!mail_index_lookup_seq(view, uid, &seq)) {
                /* our in-memory tree is out of sync */
                ret = 1;
-       } else T_BEGIN {
+       } else {
                ret = box->v.list_index_has_changed == NULL ? 0 :
                        box->v.list_index_has_changed(box, view, seq, TRUE);
-       } T_END;
+       }
 
        if (ret != 0) {
                /* error / not up to date. don't waste time with it. */
index c13d8a07a596ae2918e7365a14541c0b650ae21c..b5af436dd2ba298ee12f0f76405f1184690c5196 100644 (file)
@@ -773,11 +773,11 @@ int mailbox_list_index_view_open(struct mailbox *box, bool require_refreshed,
        } else if (!require_refreshed) {
                /* this operation doesn't need the index to be up-to-date */
                ret = 0;
-       } else T_BEGIN {
+       } else {
                ret = box->v.list_index_has_changed == NULL ? 0 :
                        box->v.list_index_has_changed(box, view, seq, FALSE);
                reason = "Mailbox has changed";
-       } T_END;
+       }
 
        if (ret != 0) {
                /* error / mailbox has changed. we'll need to sync it. */