[dovecot-cvs] dovecot/src/lib-index mail-cache-lookup.c,1.29,1.30

cras at dovecot.org cras at dovecot.org
Sat May 14 15:22:56 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv7809/lib-index

Modified Files:
	mail-cache-lookup.c 
Log Message:
Error handling fixes



Index: mail-cache-lookup.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache-lookup.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- mail-cache-lookup.c	8 Apr 2005 12:14:42 -0000	1.29
+++ mail-cache-lookup.c	14 May 2005 12:22:54 -0000	1.30
@@ -79,6 +79,9 @@
 
 		if ((ret = mail_cache_reopen(cache)) <= 0)
 			return ret;
+
+		if (MAIL_CACHE_IS_UNUSABLE(cache))
+			return 0;
 	}
 
 	return 0;
@@ -210,7 +213,7 @@
 
 	if (ret > 0 && view->trans_seq1 <= seq && view->trans_seq2 >= seq &&
 	    mail_cache_lookup_offset(view->cache, view->trans_view,
-				     seq, &offset)) {
+				     seq, &offset) > 0) {
 		array_clear(&view->tmp_offsets);
 		while (offset != 0 && ret > 0) {
 			if (find_offset(view, offset)) {



More information about the dovecot-cvs mailing list