# HG changeset patch # User Timo Sirainen # Date 1194792577 -7200 # Node ID b78cfc60f6a1b4d1c134f4292aada4f8fff45152 # Parent fd9effba151da7d11dfb9bd80878368143f2f1a4 Added missing error logging for file_dotlock_create/open calls. diff -r fd9effba151d -r b78cfc60f6a1 src/deliver/duplicate.c --- a/src/deliver/duplicate.c Sun Nov 11 16:02:25 2007 +0200 +++ b/src/deliver/duplicate.c Sun Nov 11 16:49:37 2007 +0200 @@ -210,6 +210,8 @@ file->path = p_strdup(pool, path); file->new_fd = file_dotlock_open(&duplicate_dotlock_set, path, 0, &file->dotlock); + if (file->new_fd == -1) + i_error("file_dotlock_create(%s) failed: %m", path); file->hash = hash_create(default_pool, pool, 0, duplicate_hash, duplicate_cmp); (void)duplicate_read(file); diff -r fd9effba151d -r b78cfc60f6a1 src/lib-index/mail-cache.c --- a/src/lib-index/mail-cache.c Sun Nov 11 16:02:25 2007 +0200 +++ b/src/lib-index/mail-cache.c Sun Nov 11 16:49:37 2007 +0200 @@ -472,6 +472,10 @@ i_assert(cache->dotlock == NULL); ret = file_dotlock_create(&cache->dotlock_settings, cache->filepath, 0, &cache->dotlock); + if (ret < 0) { + mail_cache_set_syscall_error(cache, + "file_dotlock_create()"); + } } if (ret <= 0) diff -r fd9effba151d -r b78cfc60f6a1 src/lib-index/mail-hash.c --- a/src/lib-index/mail-hash.c Sun Nov 11 16:02:25 2007 +0200 +++ b/src/lib-index/mail-hash.c Sun Nov 11 16:49:37 2007 +0200 @@ -417,8 +417,13 @@ &hash->file_lock); } else { i_assert(hash->dotlock == NULL); - return file_dotlock_create(&hash->dotlock_settings, - hash->filepath, 0, &hash->dotlock); + if (file_dotlock_create(&hash->dotlock_settings, + hash->filepath, 0, + &hash->dotlock) < 0) { + mail_hash_set_syscall_error(hash, "open()"); + return -1; + } + return 0; } } diff -r fd9effba151d -r b78cfc60f6a1 src/plugins/convert/convert-storage.c --- a/src/plugins/convert/convert-storage.c Sun Nov 11 16:02:25 2007 +0200 +++ b/src/plugins/convert/convert-storage.c Sun Nov 11 16:49:37 2007 +0200 @@ -403,6 +403,8 @@ if (ret <= 0) { if (ret == 0) i_error("Mailbox conversion: Lock creation timeouted"); + else + i_error("file_dotlock_create(%s) failed: %m", path); return -1; }