]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox: Saving shouldn't close any files after all, otherwise locks are lost.
authorTimo Sirainen <tss@iki.fi>
Thu, 5 Mar 2009 23:24:19 +0000 (18:24 -0500)
committerTimo Sirainen <tss@iki.fi>
Thu, 5 Mar 2009 23:24:19 +0000 (18:24 -0500)
--HG--
branch : HEAD

src/lib-storage/index/dbox/dbox-map.c

index d06d846dff68e24c710704d9ab8dfa2c26242c13..f2fbec9eeabb850195f3afcd1b3e1d75661373b3 100644 (file)
@@ -481,6 +481,7 @@ dbox_map_find_appendable_file(struct dbox_map_append_context *ctx,
                        return 1;
                }
                /* can't append to this file anymore */
+#if 0 /* FIXME: we can't close files, otherwise we lose the lock too early */
                if (files[i-1]->fd != -1) {
                        /* avoid wasting fds by closing the file, but not if
                           we're also reading from it. */
@@ -490,6 +491,7 @@ dbox_map_find_appendable_file(struct dbox_map_append_context *ctx,
                        if (files[i-1]->refcount == 1)
                                dbox_file_close(files[i-1]);
                }
+#endif
        }
        ctx->files_nonappendable_count = count;