[dovecot-cvs] dovecot/src/lib-index/maildir maildir-sync.c,1.46,1.47

cras at procontrol.fi cras at procontrol.fi
Fri May 30 01:40:37 EEST 2003


Update of /home/cvs/dovecot/src/lib-index/maildir
In directory danu:/tmp/cvs-serv30210/lib-index/maildir

Modified Files:
	maildir-sync.c 
Log Message:
bugfix



Index: maildir-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-sync.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- maildir-sync.c	29 May 2003 21:23:59 -0000	1.46
+++ maildir-sync.c	29 May 2003 21:40:35 -0000	1.47
@@ -678,6 +678,12 @@
 	size_t size;
 	int have_new;
 
+	/* FIXME: kludge. we want to have pointers to data file, so we must
+	   make sure that it's base address doesn't change. this call makes
+	   sure it's fully mmaped in memory even when we begin */
+	if (mail_index_data_get_mmaped(index->data, &size) == NULL)
+		return FALSE;
+
 	if (index->header->messages_count >= INT_MAX/32) {
 		index_set_corrupted(index, "Header says %u messages",
 				    index->header->messages_count);



More information about the dovecot-cvs mailing list