index-storage.c revision 09af804b422b9d9b29b6f0532b6308be0c20a8d8
82995cc154a929f37aa486a72a6485e9f8d34a30Timo Sirainen/* Copyright (C) 2002-2003 Timo Sirainen */
82995cc154a929f37aa486a72a6485e9f8d34a30Timo Sirainen/* How many seconds to keep index opened for reuse after it's been closed */
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen/* How many closed indexes to keep */
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainenvoid index_storage_init(struct index_storage *storage __attr_unused__)
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainenvoid index_storage_deinit(struct index_storage *storage)
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainenstatic void index_storage_add(struct mail_index *index,
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainenstatic void index_list_free(struct index_list *list)
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainenindex_storage_alloc(const char *index_dir, const char *mailbox_path,
51dbc2d559815da774f8ee5faf0e28df3c8d40c0Timo Sirainen if (index_dir == NULL || stat(index_dir, &st) < 0)
51dbc2d559815da774f8ee5faf0e28df3c8d40c0Timo Sirainen /* compare index_dir inodes so we don't break even with symlinks.
51dbc2d559815da774f8ee5faf0e28df3c8d40c0Timo Sirainen for in-memory indexes compare just mailbox paths */
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen if ((index_dir != NULL && st.st_ino == rec->index_dir_ino &&
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen strcmp(mailbox_path, rec->mailbox_path) == 0)) {
void index_storage_destroy_unrefed(void)
static const char *field_names[] = {
const char *const *arr;
*arr);
if (dec_set)
return dec;
return dec;
unsigned int secs_left)
const char *str;
switch (notify_type) {
case MAILBOX_LOCK_NOTIFY_NONE:
struct index_mailbox *
return ibox;
return NULL;
void *context)
int *syntax_error_r)
case MAIL_INDEX_ERROR_NONE:
return FALSE;
const char *keywords[],
unsigned int keywords_count)
mail_storage_set_error(ibox->box.storage,