dovecot: Fixes

dovecot at dovecot.org dovecot at dovecot.org
Thu Jul 12 03:21:51 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/ce960c33f663
changeset: 5955:ce960c33f663
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jul 12 03:21:07 2007 +0300
description:
Fixes

diffstat:

1 file changed, 6 insertions(+), 1 deletion(-)
src/lib-index/mail-cache-lookup.c |    7 ++++++-

diffs (24 lines):

diff -r b788251996e5 -r ce960c33f663 src/lib-index/mail-cache-lookup.c
--- a/src/lib-index/mail-cache-lookup.c	Thu Jul 12 03:20:57 2007 +0300
+++ b/src/lib-index/mail-cache-lookup.c	Thu Jul 12 03:21:07 2007 +0300
@@ -78,6 +78,11 @@ mail_cache_lookup_offset(struct mail_cac
 		if (++i == 2)
 			return 0;
 
+		if (cache->locked) {
+			/* we're probably compressing */
+			return 0;
+		}
+
 		if ((ret = mail_cache_reopen(cache)) <= 0) {
 			/* error / we already have the latest file open */
 			return ret;
@@ -117,7 +122,7 @@ void mail_cache_lookup_iter_init(struct 
 	if (!MAIL_CACHE_IS_UNUSABLE(view->cache)) {
 		/* look up the first offset */
 		if (mail_cache_lookup_offset(view->cache, view->view, seq,
-					     &ctx->offset) < 0)
+					     &ctx->offset) <= 0)
 			ctx->failed = TRUE;
 	}
 	ctx->remap_counter = view->cache->remap_counter;


More information about the dovecot-cvs mailing list