Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3437:2cb42efa44f6 HEAD
APPEND was broken because of recent eof-change in istream-limit.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 17 Jun 2005 23:30:12 +0300 |
parents | 3c51658d6846 |
children | 22d4fd7fd436 |
files | src/imap/cmd-append.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-append.c Thu Jun 16 22:46:59 2005 +0300 +++ b/src/imap/cmd-append.c Fri Jun 17 23:30:12 2005 +0300 @@ -289,7 +289,7 @@ struct client *client = cmd->client; struct cmd_append_context *ctx = cmd->context; size_t size; - int failed; + int failed, all_written; if (ctx->save_ctx != NULL) { if (mailbox_save_continue(ctx->save_ctx) < 0 || @@ -307,7 +307,8 @@ i_stream_skip(ctx->input, size); } - if (ctx->input->v_offset == ctx->msg_size || client->input->closed) { + all_written = ctx->input->v_offset == ctx->msg_size; + if (all_written || client->input->closed) { /* finished */ i_stream_unref(ctx->input); ctx->input = NULL; @@ -316,7 +317,7 @@ /* failed above */ client_send_storage_error(cmd, ctx->storage); failed = TRUE; - } else if (client->input->eof) { + } else if (!all_written) { /* client disconnected */ failed = TRUE; mailbox_save_cancel(ctx->save_ctx);