dovecot-2.2: lib-lda: duplicate_flush() now unlocks the duplicat...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Oct 17 17:00:14 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/f1deba7bc3e3
changeset: 17961:f1deba7bc3e3
user: Timo Sirainen <tss at iki.fi>
date: Fri Oct 17 09:59:21 2014 -0700
description:
lib-lda: duplicate_flush() now unlocks the duplicate database even if nothing had changed.
diffstat:
src/lib-lda/duplicate.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 30b84781a363 -r f1deba7bc3e3 src/lib-lda/duplicate.c
--- a/src/lib-lda/duplicate.c Thu Oct 16 08:19:03 2014 -0700
+++ b/src/lib-lda/duplicate.c Fri Oct 17 09:59:21 2014 -0700
@@ -292,8 +292,13 @@
struct hash_iterate_context *iter;
struct duplicate *d;
- if (file == NULL || !file->changed || file->new_fd == -1)
+ if (file == NULL)
return;
+ if (!file->changed || file->new_fd == -1) {
+ /* unlock the duplicate database */
+ duplicate_file_free(&ctx->file);
+ return;
+ }
memset(&hdr, 0, sizeof(hdr));
hdr.version = DUPLICATE_VERSION;
@@ -358,7 +363,7 @@
*_ctx = NULL;
if (ctx->file != NULL) {
duplicate_flush(ctx);
- duplicate_file_free(&ctx->file);
+ i_assert(ctx->file == NULL);
}
i_free(ctx->path);
i_free(ctx);
More information about the dovecot-cvs
mailing list