Mercurial > dovecot > original-hg > dovecot-1.2
changeset 1802:fef0b4df8383 HEAD
bugfixes
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 05 Oct 2003 20:45:53 +0300 |
parents | fe13672d14b3 |
children | 4a61ab6c980d |
files | src/lib-index/mail-index-open.c src/lib-index/mbox/mbox-rewrite.c |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-open.c Sun Oct 05 20:45:46 2003 +0300 +++ b/src/lib-index/mail-index-open.c Sun Oct 05 20:45:53 2003 +0300 @@ -80,6 +80,10 @@ if (!mail_cache_open_or_create(index)) return FALSE; + /* custom flags file needs to be open before rebuilding index */ + if (!mail_custom_flags_open_or_create(index)) + return FALSE; + if ((index->header->flags & MAIL_INDEX_HDR_FLAG_REBUILD) != 0 || (index->set_flags & MAIL_INDEX_HDR_FLAG_REBUILD) != 0) { @@ -97,10 +101,6 @@ rebuilt = FALSE; } - /* custom flags file needs to be open before rebuilding index */ - if (!mail_custom_flags_open_or_create(index)) - return FALSE; - if ((flags & _MAIL_INDEX_OPEN_FLAG_CREATING) == 0) { if (!mail_modifylog_open_or_create(index)) return FALSE;
--- a/src/lib-index/mbox/mbox-rewrite.c Sun Oct 05 20:45:46 2003 +0300 +++ b/src/lib-index/mbox/mbox-rewrite.c Sun Oct 05 20:45:53 2003 +0300 @@ -44,6 +44,10 @@ struct mail_index_record *rec; enum mail_index_record_flag index_flags; + if (mail_cache_lock(index->cache, FALSE) <= 0) + return FALSE; + mail_cache_unlock_later(index->cache); + rec = index->lookup(index, 1); while (rec != NULL) { index_flags = mail_cache_get_index_flags(index->cache, rec);