[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-save.c, 1.70.2.7, 1.70.2.8

tss at dovecot.org tss at dovecot.org
Sun Mar 11 18:30:04 EET 2007


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

Modified Files:
      Tag: branch_1_0
	maildir-save.c 
Log Message:
If o_stream_send_istream() fails with ENOSPC/EDQUOT, don't log a critical
error but just give user a "not enough disk space" error.



Index: maildir-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-save.c,v
retrieving revision 1.70.2.7
retrieving revision 1.70.2.8
diff -u -d -r1.70.2.7 -r1.70.2.8
--- maildir-save.c	10 Mar 2007 20:58:44 -0000	1.70.2.7
+++ maildir-save.c	11 Mar 2007 16:30:02 -0000	1.70.2.8
@@ -323,9 +323,14 @@
 		return -1;
 
 	if (o_stream_send_istream(ctx->output, ctx->input) < 0) {
-		mail_storage_set_critical(STORAGE(ctx->mbox->storage),
-			"o_stream_send_istream(%s/%s) failed: %m",
-			ctx->tmpdir, ctx->file_last->basename);
+		if (ENOSPACE(errno)) {
+			mail_storage_set_error(STORAGE(ctx->mbox->storage),
+					       "Not enough disk space");
+		} else {
+			mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+				"o_stream_send_istream(%s/%s) failed: %m",
+				ctx->tmpdir, ctx->file_last->basename);
+		}
 		ctx->failed = TRUE;
 		return -1;
 	}



More information about the dovecot-cvs mailing list