[dovecot-cvs] dovecot/src/lib-index mail-index.c,1.157,1.158

cras at dovecot.org cras at dovecot.org
Mon Oct 25 22:51:04 EEST 2004


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

Modified Files:
	mail-index.c 
Log Message:
Rebuild broken index files with mmap_disabled=yes too..



Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- mail-index.c	25 Oct 2004 19:47:18 -0000	1.157
+++ mail-index.c	25 Oct 2004 19:51:02 -0000	1.158
@@ -610,16 +610,13 @@
 	index->hdr = NULL;
 	index->map = NULL;
 
-	if (!index->mmap_disable) {
-		if ((ret = mail_index_mmap(index, map)) <= 0) {
-			mail_index_unmap_forced(index, map);
-			return ret;
-		}
-	} else {
-		if (mail_index_read_map_with_retry(index, map) <= 0) {
-			mail_index_unmap_forced(index, map);
-			return -1;
-		}
+	if (!index->mmap_disable)
+		ret = mail_index_mmap(index, map);
+	 else
+		ret = mail_index_read_map_with_retry(index, map);
+	if (ret <= 0) {
+		mail_index_unmap_forced(index, map);
+		return ret;
 	}
 
 	ret = mail_index_check_header(index, map);



More information about the dovecot-cvs mailing list