Mercurial > dovecot > original-hg > dovecot-2.1
changeset 14918:81ea622b6394
lib-lda: Give a better error message if dotlocking duplicate db fails.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 22 Feb 2013 12:19:36 +0200 |
parents | 0e0fd4b5a582 |
children | 225c64ed0439 |
files | src/lib-lda/duplicate.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-lda/duplicate.c Fri Feb 22 12:12:26 2013 +0200 +++ b/src/lib-lda/duplicate.c Fri Feb 22 12:19:36 2013 +0200 @@ -212,8 +212,14 @@ 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);