Mercurial > dovecot > core-2.2
changeset 12852:18d801449444
lib-storage: Moved mailbox_update() assert check from mdbox to common, plus fixed it.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 16 Mar 2011 17:59:07 +0200 |
parents | ad393de782ce |
children | 7d9db422549a |
files | src/lib-storage/index/dbox-multi/mdbox-storage.c src/lib-storage/mail-storage.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-multi/mdbox-storage.c Wed Mar 16 17:46:29 2011 +0200 +++ b/src/lib-storage/index/dbox-multi/mdbox-storage.c Wed Mar 16 17:59:07 2011 +0200 @@ -229,8 +229,6 @@ hdr->first_recent_uid < update->min_first_recent_uid) { uint32_t first_recent_uid = update->min_first_recent_uid; - i_assert(update->min_next_uid == 0 || - first_recent_uid < update->min_next_uid); mail_index_update_header(trans, offsetof(struct mail_index_header, first_recent_uid), &first_recent_uid, sizeof(first_recent_uid), FALSE);
--- a/src/lib-storage/mail-storage.c Wed Mar 16 17:46:29 2011 +0200 +++ b/src/lib-storage/mail-storage.c Wed Mar 16 17:59:07 2011 +0200 @@ -696,6 +696,10 @@ int mailbox_update(struct mailbox *box, const struct mailbox_update *update) { + i_assert(update->min_next_uid == 0 || + update->min_first_recent_uid == 0 || + update->min_first_recent_uid <= update->min_next_uid); + return box->v.update(box, update); }