static void mailbox_list_index_refresh_timeout(struct mailbox_list *list) { struct mailbox_list_index *ilist = INDEX_LIST_CONTEXT(list); timeout_remove(&ilist->to_refresh); (void)mailbox_list_index_refresh(list); }
static bool iter_use_index(struct mailbox_list_index_iterate_context *ctx) { struct mailbox_list_index *ilist = INDEX_LIST_CONTEXT(ctx->ctx.list); if ((ctx->ctx.flags & MAILBOX_LIST_ITER_SELECT_SUBSCRIBED) != 0) { /* for now we don't use indexes when listing subscriptions, because it needs to list also the nonexistent subscribed mailboxes, which don't exist in the index. */ return FALSE; } if ((ctx->ctx.flags & MAILBOX_LIST_ITER_RAW_LIST) != 0 && ilist->has_backing_store) { /* no indexing wanted with raw lists */ return FALSE; } if (mailbox_list_index_refresh(ctx->ctx.list) < 0 && ilist->has_backing_store) { /* refresh failed */ return FALSE; } return TRUE; }