Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/lib-storage/index/maildir/maildir-sync.c @ 3453:f140acbe46b4 HEAD
Assert/cleanup
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 02 Jul 2005 13:54:33 +0300 |
parents | 96de02ea7482 |
children | 346a494c2feb |
comparison
equal
deleted
inserted
replaced
3452:09a585f5ad4b | 3453:f140acbe46b4 |
---|---|
835 array_t ARRAY_DEFINE(keywords, unsigned int); | 835 array_t ARRAY_DEFINE(keywords, unsigned int); |
836 array_t ARRAY_DEFINE(idx_keywords, unsigned int); | 836 array_t ARRAY_DEFINE(idx_keywords, unsigned int); |
837 uint32_t uid_validity, next_uid; | 837 uint32_t uid_validity, next_uid; |
838 int ret = 0, full_rescan = FALSE; | 838 int ret = 0, full_rescan = FALSE; |
839 | 839 |
840 i_assert(maildir_uidlist_is_locked(sync_ctx->mbox->uidlist)); | |
841 | |
840 trans = mail_index_transaction_begin(view, FALSE, TRUE); | 842 trans = mail_index_transaction_begin(view, FALSE, TRUE); |
841 sync_ctx->trans = trans; | 843 sync_ctx->trans = trans; |
842 | 844 |
843 hdr = mail_index_get_header(view); | 845 hdr = mail_index_get_header(view); |
844 uid_validity = maildir_uidlist_get_uid_validity(mbox->uidlist); | 846 uid_validity = maildir_uidlist_get_uid_validity(mbox->uidlist); |
1097 } | 1099 } |
1098 if (mail_index_sync_commit(sync_ctx->sync_ctx) < 0) | 1100 if (mail_index_sync_commit(sync_ctx->sync_ctx) < 0) |
1099 ret = -1; | 1101 ret = -1; |
1100 } | 1102 } |
1101 maildir_keywords_sync_deinit(sync_ctx->keywords_sync_ctx); | 1103 maildir_keywords_sync_deinit(sync_ctx->keywords_sync_ctx); |
1104 sync_ctx->keywords_sync_ctx = NULL; | |
1102 | 1105 |
1103 if (ret == 0) { | 1106 if (ret == 0) { |
1104 mbox->ibox.commit_log_file_seq = 0; | 1107 mbox->ibox.commit_log_file_seq = 0; |
1105 mbox->ibox.commit_log_file_offset = 0; | 1108 mbox->ibox.commit_log_file_offset = 0; |
1106 } else { | 1109 } else { |