Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8657:e579406fdab6 HEAD
dbox: Notify plugins about expunges. Fixes quota.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 19 Jan 2009 12:08:51 -0500 |
parents | b5f8834ec679 |
children | d326adcfd518 |
files | src/lib-storage/index/dbox/dbox-sync-file.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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(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,