dovecot: mail_index_ext_reset() and mail_index_ext_set_reset_id(...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jul 15 00:38:05 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/e047e5b19fbd
changeset: 5997:e047e5b19fbd
user: Timo Sirainen <tss at iki.fi>
date: Sun Jul 15 00:37:57 2007 +0300
description:
mail_index_ext_reset() and mail_index_ext_set_reset_id() need to clear
ext header updates and resizes. mail_index_ext_set_reset_id() also needs to
clear ext resets.
diffstat:
1 file changed, 19 insertions(+)
src/lib-index/mail-index-transaction.c | 19 +++++++++++++++++++
diffs (29 lines):
diff -r 00be53d8f076 -r e047e5b19fbd src/lib-index/mail-index-transaction.c
--- a/src/lib-index/mail-index-transaction.c Sun Jul 15 00:28:08 2007 +0300
+++ b/src/lib-index/mail-index-transaction.c Sun Jul 15 00:37:57 2007 +0300
@@ -868,6 +868,25 @@ void mail_index_ext_set_reset_id(struct
if (array_is_created(array))
array_clear(array);
}
+ if (array_is_created(&t->ext_hdr_updates) &&
+ ext_id < array_count(&t->ext_hdr_updates)) {
+ /* if extension headers have been updated, clear them */
+ struct mail_index_transaction_ext_hdr_update **hdr;
+
+ hdr = array_idx_modifiable(&t->ext_hdr_updates, ext_id);
+ if (*hdr != NULL)
+ i_free_and_null(*hdr);
+ }
+ if (array_is_created(&t->ext_resets) &&
+ ext_id < array_count(&t->ext_resets)) {
+ /* clear resets */
+ array_idx_clear(&t->ext_resets, ext_id);
+ }
+ if (array_is_created(&t->ext_resizes) &&
+ ext_id < array_count(&t->ext_resizes)) {
+ /* clear resizes */
+ array_idx_clear(&t->ext_resets, ext_id);
+ }
if (!array_is_created(&t->ext_reset_ids))
i_array_init(&t->ext_reset_ids, ext_id + 2);
More information about the dovecot-cvs
mailing list