Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-storage/index/mbox/mbox-storage.c @ 160:ff05b320482c HEAD
Bigger changes.. full_virtual_size was removed from index record and
MessagePart caching is now forced. Also added per-message flags, including
binary flags which can be used to check if CRs need to be inserted into
message data.
Added mbox-rewrite support which can be used to write out mbox file with
updated flags. This still has the problem of being able to read changed
custom flags, that'll require another bigger change.
There's also several other mostly mbox related fixes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 06 Sep 2002 16:43:58 +0300 |
parents | 899ea73710fc |
children | 73bf05a1d862 |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-storage.c Fri Sep 06 16:29:51 2002 +0300 +++ b/src/lib-storage/index/mbox/mbox-storage.c Fri Sep 06 16:43:58 2002 +0300 @@ -362,6 +362,24 @@ } } +static void mbox_storage_close(Mailbox *box) +{ + IndexMailbox *ibox = (IndexMailbox *) box; + + if (!ibox->index->set_lock(ibox->index, MAIL_LOCK_EXCLUSIVE)) + mail_storage_set_index_error(ibox); + else { + /* update flags by rewrite mbox file */ + mbox_index_rewrite(ibox->index, + flags_file_list_get(ibox->flagsfile)); + flags_file_list_unref(ibox->flagsfile); + + (void)ibox->index->set_lock(ibox->index, MAIL_LOCK_UNLOCK); + } + + index_storage_close(box); +} + MailStorage mbox_storage = { "mbox", /* name */ @@ -389,7 +407,7 @@ NULL, /* name */ NULL, /* storage */ - index_storage_close, + mbox_storage_close, index_storage_get_status, index_storage_sync, index_storage_expunge,