[dovecot-cvs] dovecot/src/lib-storage/index/mbox istream-raw-mbox.c, 1.32, 1.33 mbox-sync.c, 1.171, 1.172

cras at dovecot.org cras at dovecot.org
Sun Oct 9 12:55:39 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv9205/lib-storage/index/mbox

Modified Files:
	istream-raw-mbox.c mbox-sync.c 
Log Message:
Added exact parameter to i_stream_stat()



Index: istream-raw-mbox.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/istream-raw-mbox.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- istream-raw-mbox.c	30 Sep 2005 20:10:42 -0000	1.32
+++ istream-raw-mbox.c	9 Oct 2005 09:55:35 -0000	1.33
@@ -302,11 +302,11 @@
 	rstream->istream.pos = 0;
 }
 
-static const struct stat *_stat(struct _istream *stream)
+static const struct stat *_stat(struct _istream *stream, int exact)
 {
 	struct raw_mbox_istream *rstream = (struct raw_mbox_istream *)stream;
 
-	return i_stream_stat(rstream->input);
+	return i_stream_stat(rstream->input, exact);
 }
 
 struct istream *i_stream_create_raw_mbox(pool_t pool, struct istream *input)

Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -d -r1.171 -r1.172
--- mbox-sync.c	28 Aug 2005 12:22:47 -0000	1.171
+++ mbox-sync.c	9 Oct 2005 09:55:35 -0000	1.172
@@ -914,7 +914,7 @@
 
 	if (seq1 == 0) {
 		/* doesn't exist anymore, seek to end of file */
-		st = i_stream_stat(sync_ctx->mbox->mbox_file_stream);
+		st = i_stream_stat(sync_ctx->mbox->mbox_file_stream, TRUE);
 		if (st == NULL) {
 			mbox_set_syscall_error(sync_ctx->mbox,
 					       "i_stream_stat()");
@@ -1219,7 +1219,7 @@
 	/* make sure i_stream_stat() doesn't try to use cached file size */
 	i_stream_sync(sync_ctx->file_input);
 
-	st = i_stream_stat(sync_ctx->file_input);
+	st = i_stream_stat(sync_ctx->file_input, TRUE);
 	if (st == NULL) {
 		mbox_set_syscall_error(sync_ctx->mbox, "i_stream_stat()");
 		return -1;
@@ -1278,7 +1278,7 @@
 		i_assert(sync_ctx->write_fd != -1);
 
 		/* copy trailer, then truncate the file */
-		st = i_stream_stat(sync_ctx->file_input);
+		st = i_stream_stat(sync_ctx->file_input, TRUE);
 		if (st == NULL) {
 			mbox_set_syscall_error(sync_ctx->mbox,
 					       "i_stream_stat()");
@@ -1321,7 +1321,7 @@
 {
 	const struct stat *st;
 
-	st = i_stream_stat(sync_ctx->file_input);
+	st = i_stream_stat(sync_ctx->file_input, FALSE);
 	if (st == NULL) {
 		mbox_set_syscall_error(sync_ctx->mbox, "i_stream_stat()");
 		return -1;
@@ -1409,7 +1409,7 @@
 	const struct stat *st;
 	int ret, partial;
 
-	st = i_stream_stat(sync_ctx->file_input);
+	st = i_stream_stat(sync_ctx->file_input, FALSE);
 	if (st == NULL) {
 		mbox_set_syscall_error(sync_ctx->mbox,
 				       "i_stream_stat()");
@@ -1485,7 +1485,7 @@
 
 	if (mbox->mbox_file_stream != NULL && mbox->mbox_fd == -1) {
 		/* read-only stream */
-		st = i_stream_stat(mbox->mbox_file_stream);
+		st = i_stream_stat(mbox->mbox_file_stream, FALSE);
 		if (st == NULL) {
 			mbox_set_syscall_error(mbox, "i_stream_stat()");
 			return -1;



More information about the dovecot-cvs mailing list