dovecot-2.2: dsync: If dsync fails due to lock timeout, give a b...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Apr 8 14:54:04 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/e41a13ae504d
changeset: 16251:e41a13ae504d
user: Timo Sirainen <tss at iki.fi>
date: Mon Apr 08 14:53:31 2013 +0300
description:
dsync: If dsync fails due to lock timeout, give a better error message.
diffstat:
src/doveadm/dsync/dsync-brain.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r b9758a044222 -r e41a13ae504d src/doveadm/dsync/dsync-brain.c
--- a/src/doveadm/dsync/dsync-brain.c Mon Apr 08 14:49:07 2013 +0300
+++ b/src/doveadm/dsync/dsync-brain.c Mon Apr 08 14:53:31 2013 +0300
@@ -238,7 +238,12 @@
if (file_wait_lock(brain->lock_fd, brain->lock_path, F_WRLCK,
FILE_LOCK_METHOD_FCNTL, brain->lock_timeout,
&brain->lock) <= 0) {
- i_error("Couldn't lock %s: %m", brain->lock_path);
+ if (errno == EAGAIN) {
+ i_error("Couldn't lock %s: Timed out after %u seconds",
+ brain->lock_path, brain->lock_timeout);
+ } else {
+ i_error("Couldn't lock %s: %m", brain->lock_path);
+ }
break;
}
if (fstat(brain->lock_fd, &st1) < 0) {
More information about the dovecot-cvs
mailing list