dovecot-1.2: dbox: Notify plugins about expunges. Fixes quota.

dovecot at dovecot.org dovecot at dovecot.org
Mon Jan 19 19:09:22 EET 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/e579406fdab6
changeset: 8657:e579406fdab6
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jan 19 12:08:51 2009 -0500
description:
dbox: Notify plugins about expunges. Fixes quota.

diffstat:

1 file changed, 7 insertions(+)
src/lib-storage/index/dbox/dbox-sync-file.c |    7 +++++++

diffs (23 lines):

diff -r b5f8834ec679 -r e579406fdab6 src/lib-storage/index/dbox/dbox-sync-file.c
--- a/src/lib-storage/index/dbox/dbox-sync-file.c	Mon Jan 19 12:08:24 2009 -0500
+++ b/src/lib-storage/index/dbox/dbox-sync-file.c	Mon Jan 19 12:08:51 2009 -0500
@@ -392,12 +392,19 @@ dbox_sync_mark_single_file_expunged(stru
 dbox_sync_mark_single_file_expunged(struct dbox_sync_context *ctx,
 				    const struct dbox_sync_file_entry *entry)
 {
+	struct mailbox *box = &ctx->mbox->ibox.box;
 	const struct seq_range *expunges;
 	unsigned int count;
+	uint32_t uid;
 
 	expunges = array_get(&entry->expunges, &count);
 	i_assert(count == 1 && expunges[0].seq1 == expunges[0].seq2);
 	mail_index_expunge(ctx->trans, expunges[0].seq1);
+
+	if (box->v.sync_notify != NULL) {
+		mail_index_lookup_uid(ctx->sync_view, expunges[0].seq1, &uid);
+		box->v.sync_notify(box, uid, MAILBOX_SYNC_TYPE_EXPUNGE);
+	}
 }
 
 int dbox_sync_file(struct dbox_sync_context *ctx,


More information about the dovecot-cvs mailing list