]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
bugfix
authorTimo Sirainen <tss@iki.fi>
Thu, 29 May 2003 21:40:35 +0000 (00:40 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 29 May 2003 21:40:35 +0000 (00:40 +0300)
--HG--
branch : HEAD

src/lib-index/maildir/maildir-sync.c

index e7074f2b2ba6822e7da619b04fbd8e14c5def8ea..7df3ed3d5e13cd34d25e618cfa0a7f6b8889de9a 100644 (file)
@@ -678,6 +678,12 @@ static int maildir_full_sync_init(struct maildir_sync_context *ctx)
        size_t size;
        int have_new;
 
+       /* FIXME: kludge. we want to have pointers to data file, so we must
+          make sure that it's base address doesn't change. this call makes
+          sure it's fully mmaped in memory even when we begin */
+       if (mail_index_data_get_mmaped(index->data, &size) == NULL)
+               return FALSE;
+
        if (index->header->messages_count >= INT_MAX/32) {
                index_set_corrupted(index, "Header says %u messages",
                                    index->header->messages_count);