dovecot-1.1: Mail cache: Don't warn if dotlocking fails due to t...

dovecot at dovecot.org dovecot at dovecot.org
Thu Sep 11 17:06:18 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/6b553940ef95
changeset: 7876:6b553940ef95
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Sep 11 17:06:13 2008 +0300
description:
Mail cache: Don't warn if dotlocking fails due to timeout (non-dotlocking already didn't).

diffstat:

1 file changed, 4 insertions(+), 1 deletion(-)
src/lib-index/mail-cache.c |    5 ++++-

diffs (20 lines):

diff -r 7b17c444c495 -r 6b553940ef95 src/lib-index/mail-cache.c
--- a/src/lib-index/mail-cache.c	Thu Sep 11 17:01:08 2008 +0300
+++ b/src/lib-index/mail-cache.c	Thu Sep 11 17:06:13 2008 +0300
@@ -478,12 +478,15 @@ static int mail_cache_lock_file(struct m
 		ret = file_dotlock_create(&cache->dotlock_settings,
 					  cache->filepath, flags,
 					  &cache->dotlock);
-		if (ret <= 0) {
+		if (ret < 0) {
 			mail_cache_set_syscall_error(cache,
 						     "file_dotlock_create()");
 		}
 	}
 
+	/* don't bother warning if locking failed due to a timeout. since cache
+	   updating isn't all that important we're using a very short timeout
+	   so it can be triggered sometimes on heavy load */
 	if (ret <= 0)
 		return ret;
 


More information about the dovecot-cvs mailing list