]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: Give a better error message if dotlocking duplicate db fails.
authorTimo Sirainen <tss@iki.fi>
Fri, 22 Feb 2013 10:19:36 +0000 (12:19 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 22 Feb 2013 10:19:36 +0000 (12:19 +0200)
src/lib-lda/duplicate.c

index f50467348610e988e7638b27a11713b7bdceb8b2..a982b93e01ceb171c7c0c89596f37f3e938bff71 100644 (file)
@@ -212,8 +212,14 @@ static struct duplicate_file *duplicate_file_new(struct duplicate_context *ctx)
        file->path = p_strdup(pool, ctx->path);
        file->new_fd = file_dotlock_open(&ctx->dotlock_set, file->path, 0,
                                         &file->dotlock);
-       if (file->new_fd == -1)
-               i_error("file_dotlock_create(%s) failed: %m", file->path);
+       if (file->new_fd != -1)
+               ;
+       else if (errno != EAGAIN)
+               i_error("file_dotlock_open(%s) failed: %m", file->path);
+       else {
+               i_error("Creating lock file for %s timed out in %u secs",
+                       file->path, ctx->dotlock_set.timeout);
+       }
        file->hash = hash_table_create(default_pool, pool, 0,
                                       duplicate_hash, duplicate_cmp);
        (void)duplicate_read(file);