[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-save.c, 1.85, 1.86
tss at dovecot.org
tss at dovecot.org
Tue Apr 17 19:40:59 EEST 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv32564/lib-storage/index/maildir
Modified Files:
maildir-save.c
Log Message:
Added mailbox_transaction_commit_get_uids() which returns the UID range for
saved/copied messages.
Index: maildir-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-save.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- maildir-save.c 2 Apr 2007 02:49:14 -0000 1.85
+++ maildir-save.c 17 Apr 2007 16:40:57 -0000 1.86
@@ -128,7 +128,8 @@
synced state. in that case it's cheap to update index file.
this can't be completely trusted because uidlist isn't locked,
but if there are some changes we can deal with it. */
- ctx->want_mails = maildir_sync_is_synced(mbox);
+ ctx->want_mails = maildir_sync_is_synced(mbox) ||
+ (t->ictx.flags & MAILBOX_TRANSACTION_FLAG_ASSIGN_UIDS) != 0;
ctx->keywords_buffer = buffer_create_const_data(pool, NULL, 0);
array_create_from_buffer(&ctx->keywords_array, ctx->keywords_buffer,
@@ -515,6 +516,8 @@
int maildir_transaction_save_commit_pre(struct maildir_save_context *ctx)
{
+ struct maildir_transaction_context *t =
+ (struct maildir_transaction_context *)ctx->ctx.transaction;
struct maildir_filename *mf;
uint32_t first_uid, next_uid;
enum maildir_uidlist_rec_flag flags;
@@ -552,6 +555,9 @@
first_uid = maildir_uidlist_get_next_uid(ctx->mbox->uidlist);
i_assert(first_uid != 0);
mail_index_append_assign_uids(ctx->trans, first_uid, &next_uid);
+
+ t->ictx.first_saved_uid = first_uid;
+ t->ictx.last_saved_uid = next_uid - 1;
}
flags = MAILDIR_UIDLIST_REC_FLAG_NEW_DIR |
More information about the dovecot-cvs
mailing list