dovecot-2.0: lib-index: Keep indexes open while they are in allo...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Feb 20 11:45:56 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/e2c2ce0ce5fa
changeset: 10784:e2c2ce0ce5fa
user: Timo Sirainen <tss at iki.fi>
date: Sat Feb 20 11:45:52 2010 +0200
description:
lib-index: Keep indexes open while they are in alloc-cache.
diffstat:
src/lib-index/mail-index-alloc-cache.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r 3c0d86e79040 -r e2c2ce0ce5fa src/lib-index/mail-index-alloc-cache.c
--- a/src/lib-index/mail-index-alloc-cache.c Sat Feb 20 10:11:42 2010 +0200
+++ b/src/lib-index/mail-index-alloc-cache.c Sat Feb 20 11:45:52 2010 +0200
@@ -58,6 +58,8 @@
static void
mail_index_alloc_cache_list_free(struct mail_index_alloc_cache_list *list)
{
+ if (list->index->open_count > 0)
+ mail_index_close(list->index);
mail_index_free(&list->index);
i_free(list->mailbox_path);
i_free(list);
@@ -212,5 +214,7 @@
list->index_dir_ino = st.st_ino;
list->index_dir_dev = st.st_dev;
}
+ /* keep it referenced for ourself */
+ index->open_count++;
}
}
More information about the dovecot-cvs
mailing list