From: Timo Sirainen Date: Mon, 24 May 2004 01:01:42 +0000 (+0300) Subject: fix for last change X-Git-Tag: 1.1.alpha1~4057 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2c7f9a96bf3529307d78ad5f92a50cba9febe69;p=thirdparty%2Fdovecot%2Fcore.git fix for last change --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-index-lock.c b/src/lib-index/mail-index-lock.c index 0c6ead1ed2..5ef200b62c 100644 --- a/src/lib-index/mail-index-lock.c +++ b/src/lib-index/mail-index-lock.c @@ -346,7 +346,8 @@ int mail_index_lock_exclusive(struct mail_index *index, /* if header size is smaller than what we have, we'll have to recreate the index to grow it. so don't even try regular locking. */ - if (index->hdr->header_size >= sizeof(*index->hdr)) { + if (index->map->hdr == &index->map->hdr_copy && + index->map->hdr->header_size < sizeof(*index->hdr)) { /* wait two seconds for exclusive lock */ ret = mail_index_lock(index, F_WRLCK, 2, TRUE, lock_id_r); if (ret > 0)