dovecot-2.2-pigeonhole: managesieve: Fixed handling of o_stream_...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Sun Oct 19 07:34:39 UTC 2014


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/e15298e74253
changeset: 1927:e15298e74253
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Sun Oct 19 09:34:03 2014 +0200
description:
managesieve: Fixed handling of o_stream_send_istream() errors during GETSCRIPT command.

diffstat:

 src/managesieve/cmd-getscript.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 465dbd029556 -r e15298e74253 src/managesieve/cmd-getscript.c
--- a/src/managesieve/cmd-getscript.c	Sun Oct 19 01:02:02 2014 +0200
+++ b/src/managesieve/cmd-getscript.c	Sun Oct 19 09:34:03 2014 +0200
@@ -54,9 +54,15 @@
 	ret = o_stream_send_istream(client->output, ctx->script_stream);
 
 	if ( ret < 0 ) {
-		sieve_storage_set_critical(ctx->storage,
-			"o_stream_send_istream() failed for script `%s' from %s: %m",
-			sieve_script_name(ctx->script), sieve_script_location(ctx->script));
+		if ( ctx->script_stream->stream_errno != 0 ) {
+			sieve_storage_set_critical(ctx->storage,
+				"o_stream_send_istream() failed for script `%s' from %s: %s",
+				sieve_script_name(ctx->script),
+				sieve_script_location(ctx->script),
+				i_stream_get_error(ctx->script_stream));
+		} else {
+			client_disconnect(ctx->client, NULL);
+		}
 		ctx->failed = TRUE;
 		return cmd_getscript_finish(ctx);
 	}


More information about the dovecot-cvs mailing list