[dovecot-cvs] dovecot: Cleanups
dovecot at dovecot.org
dovecot at dovecot.org
Tue May 22 21:26:06 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/b0754b4d187d
changeset: 5649:b0754b4d187d
user: Timo Sirainen <tss at iki.fi>
date: Tue May 22 21:26:02 2007 +0300
description:
Cleanups
diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
src/lib-index/mail-index-transaction.c | 8 +++++++-
diffs (31 lines):
diff -r 119ffb997eda -r b0754b4d187d src/lib-index/mail-index-transaction.c
--- a/src/lib-index/mail-index-transaction.c Tue May 22 21:24:15 2007 +0300
+++ b/src/lib-index/mail-index-transaction.c Tue May 22 21:26:02 2007 +0300
@@ -371,6 +371,9 @@ static int _mail_index_transaction_commi
uoff_t *log_file_offset_r)
{
int ret;
+
+ i_assert(t->first_new_seq >
+ mail_index_view_get_messages_count(t->view));
if (t->cache_trans_ctx != NULL) {
mail_cache_transaction_commit(t->cache_trans_ctx);
@@ -1004,13 +1007,16 @@ mail_index_transaction_begin(struct mail
t->view = view;
t->hide_transaction = hide;
t->external = external;
- t->first_new_seq = mail_index_view_get_messages_count(t->view)+1;
t->sync_transaction = view->index_sync_view;
if (view->syncing) {
/* transaction view cannot work if new records are being added
in two places. make sure it doesn't happen. */
t->no_appends = TRUE;
+ t->first_new_seq = (uint32_t)-1;
+ } else {
+ t->first_new_seq =
+ mail_index_view_get_messages_count(t->view) + 1;
}
i_array_init(&t->module_contexts,
More information about the dovecot-cvs
mailing list