changeset 8189:7528e7256a1a HEAD

Mail cache: Don't warn if dotlocking fails due to timeout (non-dotlocking already didn't).
author Timo Sirainen <tss@iki.fi>
date Thu, 11 Sep 2008 17:06:29 +0300
parents 2db48458d73b
children 9902de77194e
files src/lib-index/mail-cache.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-cache.c	Thu Sep 11 17:01:32 2008 +0300
+++ b/src/lib-index/mail-cache.c	Thu Sep 11 17:06:29 2008 +0300
@@ -478,12 +478,15 @@
 		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;