]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fix for last change
authorTimo Sirainen <tss@iki.fi>
Mon, 24 May 2004 01:01:42 +0000 (04:01 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 24 May 2004 01:01:42 +0000 (04:01 +0300)
--HG--
branch : HEAD

src/lib-index/mail-index-lock.c

index 0c6ead1ed22f8c8ba7bbac67d65d9464b7516dad..5ef200b62c258dca2f12e01ee64bb92710f360fd 100644 (file)
@@ -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)