[dovecot-cvs] dovecot/src/lib-index mail-index.c, 1.214, 1.215 mail-index-lock.c, 1.47, 1.48

cras at dovecot.org cras at dovecot.org
Fri Jan 6 23:16:46 EET 2006


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

Modified Files:
	mail-index.c mail-index-lock.c 
Log Message:
Minor cleanups



Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -d -r1.214 -r1.215
--- mail-index.c	6 Jan 2006 17:30:26 -0000	1.214
+++ mail-index.c	6 Jan 2006 21:16:43 -0000	1.215
@@ -584,13 +584,6 @@
 	i_free(map);
 }
 
-static void mail_index_unmap_forced(struct mail_index *index,
-				    struct mail_index_map *map)
-{
-	mail_index_map_clear(index, map);
-	mail_index_unmap(index, map);
-}
-
 static void mail_index_map_copy_hdr(struct mail_index_map *map,
 				    const struct mail_index_header *hdr)
 {
@@ -1034,7 +1027,8 @@
 	}
 
 	if (ret <= 0) {
-		mail_index_unmap_forced(index, map);
+		mail_index_map_clear(index, map);
+		mail_index_unmap(index, map);
 		index->mapping = FALSE;
 		return ret;
 	}

Index: mail-index-lock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-lock.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- mail-index-lock.c	6 Jan 2006 20:13:54 -0000	1.47
+++ mail-index-lock.c	6 Jan 2006 21:16:43 -0000	1.48
@@ -449,6 +449,10 @@
 
 		if (mail_index_copy_lock_finish(index) < 0)
 			mail_index_set_inconsistent(index);
+
+		/* We may still have shared locks for the old file, but they
+		   don't matter. They're invalidated when we re-open the new
+		   index file. */
 	}
 }
 



More information about the dovecot-cvs mailing list