[dovecot-cvs] dovecot/src/lib-index/mbox istream-mbox.c,1.3,1.4 mbox-index.c,1.82,1.83

cras at procontrol.fi cras at procontrol.fi
Wed Oct 29 15:37:35 EET 2003


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

Modified Files:
	istream-mbox.c mbox-index.c 
Log Message:
Fixes to make copying mail inside same mbox working.



Index: istream-mbox.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mbox/istream-mbox.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- istream-mbox.c	6 Oct 2003 21:06:36 -0000	1.3
+++ istream-mbox.c	29 Oct 2003 13:37:33 -0000	1.4
@@ -80,7 +80,7 @@
 
 	if (limit != old_limit)
 		i_stream_set_read_limit(mstream->input, old_limit);
-	return ret;
+	return mstream->istream.pos == 0 ? -1 : (ssize_t)mstream->istream.pos;
 }
 
 static void _seek(struct _istream *stream, uoff_t v_offset)

Index: mbox-index.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mbox/mbox-index.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- mbox-index.c	29 Sep 2003 14:15:06 -0000	1.82
+++ mbox-index.c	29 Oct 2003 13:37:33 -0000	1.83
@@ -85,11 +85,6 @@
 						     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_stream =
 				i_stream_create_file(index->mbox_fd,
 						     default_pool,



More information about the dovecot-cvs mailing list