[dovecot-cvs] dovecot/src/lib ibuffer-mmap.c,1.5,1.6

cras at procontrol.fi cras at procontrol.fi
Sat Oct 26 22:44:29 EEST 2002


Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv4348

Modified Files:
	ibuffer-mmap.c 
Log Message:
seek: we munmap()ed unneededly sometimes



Index: ibuffer-mmap.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ibuffer-mmap.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ibuffer-mmap.c	20 Oct 2002 02:53:01 -0000	1.5
+++ ibuffer-mmap.c	26 Oct 2002 18:44:27 -0000	1.6
@@ -179,9 +179,9 @@
 	abs_offset = buf->ibuffer.start_offset + v_offset;
 	if (buf->buffer_size != 0 &&
 	    mbuf->mmap_offset <= abs_offset &&
-	    mbuf->mmap_offset + buf->pos > abs_offset) {
+	    mbuf->mmap_offset + buf->buffer_size > abs_offset) {
 		/* already mmaped */
-		buf->skip = abs_offset - mbuf->mmap_offset;
+		buf->skip = buf->pos = abs_offset - mbuf->mmap_offset;
 	} else {
 		/* force reading next time */
 		i_buffer_munmap(mbuf);




More information about the dovecot-cvs mailing list