[dovecot-cvs] dovecot/src/lib-index mail-index-sync-update.c, 1.111, 1.112

tss at dovecot.org tss at dovecot.org
Tue Mar 6 21:51:26 EET 2007


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

Modified Files:
	mail-index-sync-update.c 
Log Message:
When we were syncing in-memory maps, we still should have updated the
log file offsets because other views could have used them.



Index: mail-index-sync-update.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync-update.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- mail-index-sync-update.c	6 Feb 2007 16:01:23 -0000	1.111
+++ mail-index-sync-update.c	6 Mar 2007 19:51:24 -0000	1.112
@@ -91,13 +91,11 @@
 		}
 	}
 
-	if (!MAIL_INDEX_MAP_IS_IN_MEMORY(old_map)) {
-		/* other processes may still have the same file mapped,
-		   and since we could have already updated the records, make
-		   sure we leave the header in a valid state as well */
-		mail_index_sync_update_log_offset(ctx, old_map);
-		(void)mail_index_map_msync(view->index, old_map);
-	}
+	/* some views may still use the same mapping, and since we could have
+	   already updated the records, make sure we leave the header in a
+	   valid state as well */
+	mail_index_sync_update_log_offset(ctx, old_map);
+	(void)mail_index_map_msync(view->index, old_map);
 	mail_index_unmap(view->index, &old_map);
 
 	i_assert(view->hdr.messages_count == map->hdr.messages_count);



More information about the dovecot-cvs mailing list