dovecot-1.1: mbox: Be sure to flush output when writing to non-s...

dovecot at dovecot.org dovecot at dovecot.org
Tue May 27 00:16:16 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/fedeb23a3d53
changeset: 7560:fedeb23a3d53
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 27 00:16:12 2008 +0300
description:
mbox: Be sure to flush output when writing to non-seekable "mboxes" (pipes).

diffstat:

1 file changed, 4 insertions(+)
src/lib-storage/index/mbox/mbox-save.c |    4 ++++

diffs (14 lines):

diff -r dd9d344ba140 -r fedeb23a3d53 src/lib-storage/index/mbox/mbox-save.c
--- a/src/lib-storage/index/mbox/mbox-save.c	Tue May 27 00:12:01 2008 +0300
+++ b/src/lib-storage/index/mbox/mbox-save.c	Tue May 27 00:16:12 2008 +0300
@@ -653,6 +653,10 @@ int mbox_save_finish(struct mail_save_co
 {
 	struct mbox_save_context *ctx = (struct mbox_save_context *)_ctx;
 
+	/* make sure everything is written */
+	if (o_stream_flush(ctx->output) < 0)
+		return write_error(ctx);
+
 	ctx->finished = TRUE;
 	if (!ctx->failed) {
 		T_BEGIN {


More information about the dovecot-cvs mailing list