[dovecot-cvs]
dovecot/src/lib-storage/index index-storage.c,1.31,1.32
index-storage.h,1.36,1.37
cras at procontrol.fi
cras at procontrol.fi
Sat Jun 14 21:38:08 EEST 2003
Update of /home/cvs/dovecot/src/lib-storage/index
In directory danu:/tmp/cvs-serv11274/lib-storage/index
Modified Files:
index-storage.c index-storage.h
Log Message:
Close index files before deleting the mailbox.
Index: index-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-storage.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- index-storage.c 30 May 2003 02:01:15 -0000 1.31
+++ index-storage.c 14 Jun 2003 17:38:06 -0000 1.32
@@ -99,6 +99,23 @@
i_unreached();
}
+void index_storage_destroy_unrefed(void)
+{
+ struct index_list **list, *rec;
+
+ for (list = &indexes; *list != NULL;) {
+ rec = *list;
+
+ if (rec->refcount == 0) {
+ rec->index->free(rec->index);
+ *list = rec->next;
+ i_free(rec);
+ } else {
+ list = &(*list)->next;
+ }
+ }
+}
+
static enum mail_data_field get_data_fields(const char *fields)
{
static const char *field_names[] = {
Index: index-storage.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-storage.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- index-storage.h 7 May 2003 12:06:47 -0000 1.36
+++ index-storage.h 14 Jun 2003 17:38:06 -0000 1.37
@@ -44,6 +44,7 @@
void index_storage_add(struct mail_index *index);
struct mail_index *index_storage_lookup_ref(const char *path);
void index_storage_unref(struct mail_index *index);
+void index_storage_destroy_unrefed(void);
struct index_mailbox *
index_storage_init(struct mail_storage *storage, struct mailbox *box,
More information about the dovecot-cvs
mailing list