dovecot-2.1-pigeonhole: lib-managesieve: changed EPROTO error to...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Tue Apr 24 14:08:42 EEST 2012


details:   http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/ef5045159e6b
changeset: 1615:ef5045159e6b
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Tue Apr 24 13:08:36 2012 +0200
description:
lib-managesieve: changed EPROTO error to EIO in ManageSieve string stream because it is apparently not known in BSD.

diffstat:

 src/lib-managesieve/managesieve-parser.c    |  6 +++---
 src/managesieve-login/client-authenticate.c |  2 +-
 src/managesieve/cmd-putscript.c             |  2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diffs (54 lines):

diff -r 2ff0a5c5c892 -r ef5045159e6b src/lib-managesieve/managesieve-parser.c
--- a/src/lib-managesieve/managesieve-parser.c	Sun Apr 22 17:16:08 2012 +0200
+++ b/src/lib-managesieve/managesieve-parser.c	Tue Apr 24 13:08:36 2012 +0200
@@ -636,7 +636,7 @@
 		if (ret <= 0 && (ret != -2 || stream->skip == 0)) {
 			if ( stream->istream.eof && stream->istream.stream_errno == 0 ) {
 				stream->istream.eof = 0;
-				stream->istream.stream_errno = EPROTO;
+				stream->istream.stream_errno = EIO;
 			} else {
 				stream->istream.stream_errno = stream->parent->stream_errno;
 				stream->istream.eof = stream->parent->eof;
@@ -673,7 +673,7 @@
 			if ( !IS_QUOTED_SPECIAL(data[i]) ) {
 				qsstream->parser->error =
 					"Escaped quoted-string character is not a QUOTED-SPECIAL.";
-				stream->istream.stream_errno = EPROTO;
+				stream->istream.stream_errno = EIO;
 				ret = -1;
 				break;
 			}
@@ -682,7 +682,7 @@
 
 		if ( (data[i] & 0x80) == 0 && ( data[i] == '\r' || data[i] == '\n' ) ) {
 			qsstream->parser->error = "String contains invalid character.";
-			stream->istream.stream_errno = EPROTO;
+			stream->istream.stream_errno = EIO;
 			ret = -1;
 			break;
 		}
diff -r 2ff0a5c5c892 -r ef5045159e6b src/managesieve-login/client-authenticate.c
--- a/src/managesieve-login/client-authenticate.c	Sun Apr 22 17:16:08 2012 +0200
+++ b/src/managesieve-login/client-authenticate.c	Tue Apr 24 13:08:36 2012 +0200
@@ -235,7 +235,7 @@
 	if ( ret == 0 ) return 0;
 
 	if ( msieve_client->auth_response_input->stream_errno != 0 ) {
-		if ( msieve_client->auth_response_input->stream_errno == EPROTO ) {
+		if ( msieve_client->auth_response_input->stream_errno == EIO ) {
 			error = managesieve_parser_get_error(msieve_client->parser, &fatal);
 			if (error != NULL ) {
 				if (fatal) {
diff -r 2ff0a5c5c892 -r ef5045159e6b src/managesieve/cmd-putscript.c
--- a/src/managesieve/cmd-putscript.c	Sun Apr 22 17:16:08 2012 +0200
+++ b/src/managesieve/cmd-putscript.c	Tue Apr 24 13:08:36 2012 +0200
@@ -371,7 +371,7 @@
 		bool all_written = FALSE;
 
 		if ( ctx->script_size == 0 ) {
-			if ( ctx->input->stream_errno == EPROTO ) {
+			if ( ctx->input->stream_errno == EIO ) {
 				bool fatal;
 				const char *parse_error;
 


More information about the dovecot-cvs mailing list