[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-rewrite.c, 1.35, 1.36

cras at dovecot.org cras at dovecot.org
Fri Oct 15 02:41:20 EEST 2004


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

Modified Files:
	mbox-sync-rewrite.c 
Log Message:
Fixed error message



Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- mbox-sync-rewrite.c	14 Oct 2004 17:56:39 -0000	1.35
+++ mbox-sync-rewrite.c	14 Oct 2004 23:41:17 -0000	1.36
@@ -31,9 +31,16 @@
 				      source, size);
 	ret = o_stream_send_istream(output, input);
 	i_stream_unref(input);
-	ret = ret == (off_t)size ? 0 : -1;
 
-	if (ret < 0) {
+        if (ret == (off_t)size)
+		ret = 0;
+	else if (ret >= 0) {
+		mail_storage_set_critical(sync_ctx->ibox->box.storage,
+			"mbox_move(%"PRIuUOFF_T", %"PRIuUOFF_T", %"PRIuUOFF_T
+			") moved only %"PRIuUOFF_T" bytes in mbox file %s",
+			dest, source, size, (uoff_t)ret, sync_ctx->ibox->path);
+		ret = -1;
+	} else if (ret < 0) {
 		errno = output->stream_errno;
 		mbox_set_syscall_error(sync_ctx->ibox,
 				       "o_stream_send_istream()");



More information about the dovecot-cvs mailing list