From: Timo Sirainen Date: Mon, 19 Jan 2009 17:08:51 +0000 (-0500) Subject: dbox: Notify plugins about expunges. Fixes quota. X-Git-Tag: 1.2.beta1~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c6cf347a1edc254ed0d912613ce6eab6c3510b5;p=thirdparty%2Fdovecot%2Fcore.git dbox: Notify plugins about expunges. Fixes quota. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/dbox/dbox-sync-file.c b/src/lib-storage/index/dbox/dbox-sync-file.c index 846cf1ab02..f6d3dd9284 100644 --- a/src/lib-storage/index/dbox/dbox-sync-file.c +++ b/src/lib-storage/index/dbox/dbox-sync-file.c @@ -392,12 +392,19 @@ static void 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,