dovecot-1.1: If FETCH gets too little message data, use "FETCH f...

dovecot at dovecot.org dovecot at dovecot.org
Tue May 19 20:37:51 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.1/rev/1d7bedb6f100
changeset: 8280:1d7bedb6f100
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 19 13:37:31 2009 -0400
description:
If FETCH gets too little message data, use "FETCH failed" disconnection reason.

diffstat:

1 file changed, 2 insertions(+), 2 deletions(-)
src/imap/imap-fetch-body.c |    4 ++--

diffs (21 lines):

diff -r 96d6f17cc540 -r 1d7bedb6f100 src/imap/imap-fetch-body.c
--- a/src/imap/imap-fetch-body.c	Tue May 19 13:36:33 2009 -0400
+++ b/src/imap/imap-fetch-body.c	Tue May 19 13:37:31 2009 -0400
@@ -212,7 +212,7 @@ static off_t imap_fetch_send(struct imap
 			mailbox_get_name(ctx->mail->box), ctx->mail->uid,
 			(uoff_t)sent, virtual_size);
 		mail_set_cache_corrupted(ctx->mail, ctx->cur_size_field);
-		o_stream_close(output);
+		client_disconnect(ctx->client, "FETCH failed");
 		return -1;
 	}
 
@@ -274,7 +274,7 @@ static int fetch_stream_send_direct(stru
 				"%"PRIuUOFF_T" vs %"PRIuUOFF_T,
 				mailbox_get_name(ctx->mail->box),
 				ctx->mail->uid, ctx->cur_offset, ctx->cur_size);
-			o_stream_close(ctx->client->output);
+			client_disconnect(ctx->client, "FETCH failed");
 			return -1;
 		}
 


More information about the dovecot-cvs mailing list