From: Timo Sirainen Date: Mon, 8 Apr 2013 11:53:31 +0000 (+0300) Subject: dsync: If dsync fails due to lock timeout, give a better error message. X-Git-Tag: 2.2.rc7~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d66fbf7a14d354cd7ffa3e504fc660a99f22f75;p=thirdparty%2Fdovecot%2Fcore.git dsync: If dsync fails due to lock timeout, give a better error message. --- diff --git a/src/doveadm/dsync/dsync-brain.c b/src/doveadm/dsync/dsync-brain.c index ec837d11d9..0ab6d616d7 100644 --- a/src/doveadm/dsync/dsync-brain.c +++ b/src/doveadm/dsync/dsync-brain.c @@ -238,7 +238,12 @@ dsync_brain_lock(struct dsync_brain *brain, const char *remote_hostname) 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) {