[dovecot-cvs] dovecot/src/imap cmd-append.c,1.63,1.64

cras at dovecot.org cras at dovecot.org
Tue Jun 28 14:15:59 EEST 2005


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv31530

Modified Files:
	cmd-append.c 
Log Message:
crashfix



Index: cmd-append.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-append.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- cmd-append.c	28 Jun 2005 11:13:56 -0000	1.63
+++ cmd-append.c	28 Jun 2005 11:15:57 -0000	1.64
@@ -309,6 +309,8 @@
 
 	if (ctx->input->eof || client->input->closed) {
 		/* finished */
+		int all_written = ctx->input->v_offset == ctx->msg_size;
+
 		i_stream_unref(ctx->input);
 		ctx->input = NULL;
 
@@ -316,7 +318,7 @@
 			/* failed above */
 			client_send_storage_error(cmd, ctx->storage);
 			failed = TRUE;
-		} else if (ctx->input->v_offset != ctx->msg_size) {
+		} else if (!all_written) {
 			/* client disconnected before it finished sending the
 			   whole message. */
 			failed = TRUE;



More information about the dovecot-cvs mailing list