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

cras at procontrol.fi cras at procontrol.fi
Thu Nov 21 22:43:27 EET 2002


Update of /home/cvs/dovecot/src/lib-index/mbox
In directory danu:/tmp/cvs-serv499

Modified Files:
	mbox-index.c 
Log Message:
lseek() to beginning of file before creating file ibuffer.



Index: mbox-index.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mbox/mbox-index.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- mbox-index.c	21 Nov 2002 20:31:03 -0000	1.46
+++ mbox-index.c	21 Nov 2002 20:43:25 -0000	1.47
@@ -78,6 +78,11 @@
 						     MAIL_MMAP_BLOCK_SIZE,
 						     0, 0, FALSE);
 		} else {
+			if (lseek(index->mbox_fd, 0, SEEK_SET) < 0) {
+				mbox_set_syscall_error(index, "lseek()");
+				return NULL;
+			}
+
 			index->mbox_inbuf =
 				i_buffer_create_file(index->mbox_fd,
 						     default_pool,




More information about the dovecot-cvs mailing list