dovecot-2.0: mdbox: mailbox_update() ignored cache_fields.

dovecot at dovecot.org dovecot at dovecot.org
Mon Feb 22 18:52:44 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/58e9e66050e9
changeset: 10805:58e9e66050e9
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 22 18:52:41 2010 +0200
description:
mdbox: mailbox_update() ignored cache_fields.

diffstat:

 src/lib-storage/index/dbox-multi/mdbox-storage.c |  2 ++
 src/lib-storage/index/index-storage.c            |  5 ++---
 src/lib-storage/index/index-storage.h            |  2 ++
 3 files changed, 6 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r 32d6dd7ce7cb -r 58e9e66050e9 src/lib-storage/index/dbox-multi/mdbox-storage.c
--- a/src/lib-storage/index/dbox-multi/mdbox-storage.c	Mon Feb 22 17:53:36 2010 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-storage.c	Mon Feb 22 18:52:41 2010 +0200
@@ -257,6 +257,8 @@
 		if (index_storage_mailbox_open(box, FALSE) < 0)
 			return -1;
 	}
+	if (update->cache_fields != NULL)
+		index_storage_mailbox_update_cache_fields(box, update);
 	return mdbox_write_index_header(box, update);
 }
 
diff -r 32d6dd7ce7cb -r 58e9e66050e9 src/lib-storage/index/index-storage.c
--- a/src/lib-storage/index/index-storage.c	Mon Feb 22 17:53:36 2010 +0200
+++ b/src/lib-storage/index/index-storage.c	Mon Feb 22 18:52:41 2010 +0200
@@ -337,9 +337,8 @@
 	mail_index_alloc_cache_unref(&box->index);
 }
 
-static void
-index_storage_mailbox_update_cache_fields(struct mailbox *box,
-					  const struct mailbox_update *update)
+void index_storage_mailbox_update_cache_fields(struct mailbox *box,
+					       const struct mailbox_update *update)
 {
 	const char *const *field_names = update->cache_fields;
 	ARRAY_DEFINE(new_fields, struct mail_cache_field);
diff -r 32d6dd7ce7cb -r 58e9e66050e9 src/lib-storage/index/index-storage.h
--- a/src/lib-storage/index/index-storage.h	Mon Feb 22 17:53:36 2010 +0200
+++ b/src/lib-storage/index/index-storage.h	Mon Feb 22 18:52:41 2010 +0200
@@ -76,6 +76,8 @@
 void index_storage_mailbox_free(struct mailbox *box);
 int index_storage_mailbox_update(struct mailbox *box,
 				 const struct mailbox_update *update);
+void index_storage_mailbox_update_cache_fields(struct mailbox *box,
+					       const struct mailbox_update *update);
 int index_storage_mailbox_delete(struct mailbox *box);
 int index_storage_mailbox_delete_dir(struct mailbox *box, bool mailbox_deleted);
 int index_storage_mailbox_rename(struct mailbox *src, struct mailbox *dest,


More information about the dovecot-cvs mailing list