dovecot-2.2: dbox: Crashfixes
dovecot at dovecot.org
dovecot at dovecot.org
Sun Aug 12 01:29:37 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/5fc4fab20fd0
changeset: 14866:5fc4fab20fd0
user: Timo Sirainen <tss at iki.fi>
date: Sun Aug 12 01:29:16 2012 +0300
description:
dbox: Crashfixes
diffstat:
src/lib-storage/index/dbox-common/dbox-file-fix.c | 3 ++-
src/lib-storage/index/dbox-common/dbox-save.c | 6 ++++++
2 files changed, 8 insertions(+), 1 deletions(-)
diffs (31 lines):
diff -r e852d1fbf40a -r 5fc4fab20fd0 src/lib-storage/index/dbox-common/dbox-file-fix.c
--- a/src/lib-storage/index/dbox-common/dbox-file-fix.c Sat Aug 11 08:10:32 2012 +0300
+++ b/src/lib-storage/index/dbox-common/dbox-file-fix.c Sun Aug 12 01:29:16 2012 +0300
@@ -86,9 +86,10 @@
input = i_stream_create_limit(file->input, count);
bytes = o_stream_send_istream(output, input);
+ errno = input->stream_errno;
i_stream_unref(&input);
- if (input->stream_errno != 0) {
+ if (errno != 0) {
mail_storage_set_critical(&file->storage->storage,
"read(%s) failed: %m", file->cur_path);
return -1;
diff -r e852d1fbf40a -r 5fc4fab20fd0 src/lib-storage/index/dbox-common/dbox-save.c
--- a/src/lib-storage/index/dbox-common/dbox-save.c Sat Aug 11 08:10:32 2012 +0300
+++ b/src/lib-storage/index/dbox-common/dbox-save.c Sun Aug 12 01:29:16 2012 +0300
@@ -104,6 +104,12 @@
if (index_attachment_save_finish(&ctx->ctx) < 0)
ctx->failed = TRUE;
}
+ if (o_stream_nfinish(ctx->ctx.output) < 0) {
+ mail_storage_set_critical(ctx->ctx.transaction->box->storage,
+ "write(%s) failed: %m",
+ o_stream_get_name(ctx->ctx.output));
+ ctx->failed = TRUE;
+ }
if (ctx->ctx.output == dbox_output)
return;
More information about the dovecot-cvs
mailing list