static void mbox_notify_changes(struct mailbox *box) { struct mbox_mailbox *mbox = (struct mbox_mailbox *)box; if (box->notify_callback == NULL) mailbox_watch_remove_all(box); else if (!mbox->no_mbox_file) mailbox_watch_add(box, mailbox_get_path(box)); }
void index_storage_mailbox_close(struct mailbox *box) { struct index_mailbox_context *ibox = INDEX_STORAGE_CONTEXT(box); mailbox_watch_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); if (box->view != NULL) { 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); ibox->sync_last_check = 0; }