void index_storage_mailbox_close(struct mailbox *box) { struct index_mailbox_context *ibox = INDEX_STORAGE_CONTEXT(box); index_mailbox_check_remove_all(box); if (box->input != NULL) i_stream_unref(&box->input); if (box->view_pvt != NULL) mail_index_view_close(&box->view_pvt); if (box->index_pvt != NULL) mail_index_close(box->index_pvt); mail_index_view_close(&box->view); mail_index_close(box->index); box->cache = NULL; ibox->keyword_names = NULL; i_free_and_null(ibox->cache_fields); if (array_is_created(&ibox->recent_flags)) array_free(&ibox->recent_flags); ibox->recent_flags_prev_uid = 0; ibox->recent_flags_count = 0; ibox->sync_last_check = 0; }
static void mbox_notify_changes(struct mailbox *box) { struct mbox_mailbox *mbox = (struct mbox_mailbox *)box; if (box->notify_callback == NULL) index_mailbox_check_remove_all(&mbox->box); else if (!mbox->no_mbox_file) index_mailbox_check_add(&mbox->box, mbox->box.path); }