dovecot-2.2: imapc, pop3c: Don't hide SSL handshake errors.

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 4 18:18:57 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/ec933ef95687
changeset: 16162:ec933ef95687
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 04 18:18:50 2013 +0300
description:
imapc, pop3c: Don't hide SSL handshake errors.

diffstat:

 src/lib-imap-client/imapc-connection.c     |  4 +---
 src/lib-storage/index/pop3c/pop3c-client.c |  4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r ef939a32de27 -r ec933ef95687 src/lib-imap-client/imapc-connection.c
--- a/src/lib-imap-client/imapc-connection.c	Thu Apr 04 18:10:04 2013 +0300
+++ b/src/lib-imap-client/imapc-connection.c	Thu Apr 04 18:18:50 2013 +0300
@@ -116,7 +116,6 @@
 	unsigned int idling:1;
 	unsigned int idle_stopping:1;
 	unsigned int idle_plus_waiting:1;
-	unsigned int handshake_failed:1;
 };
 
 static int imapc_connection_output(struct imapc_connection *conn);
@@ -1112,7 +1111,7 @@
 		if (conn->ssl_iostream == NULL) {
 			i_error("imapc(%s): Server disconnected unexpectedly",
 				conn->name);
-		} else if (!conn->handshake_failed) {
+		} else {
 			errstr = ssl_iostream_get_last_error(conn->ssl_iostream);
 			if (errstr == NULL) {
 				errstr = conn->input->stream_errno == 0 ? "EOF" :
@@ -1146,7 +1145,6 @@
 		}
 		return 0;
 	} else {
-		conn->handshake_failed = TRUE;
 		*error_r = error;
 		return -1;
 	}
diff -r ef939a32de27 -r ec933ef95687 src/lib-storage/index/pop3c/pop3c-client.c
--- a/src/lib-storage/index/pop3c/pop3c-client.c	Thu Apr 04 18:10:04 2013 +0300
+++ b/src/lib-storage/index/pop3c/pop3c-client.c	Thu Apr 04 18:18:50 2013 +0300
@@ -61,7 +61,6 @@
 	const char *input_line;
 	struct istream *dot_input;
 
-	unsigned int handshake_failed:1;
 	unsigned int running:1;
 };
 
@@ -396,7 +395,7 @@
 		if (client->ssl_iostream == NULL) {
 			i_error("pop3c(%s): Server disconnected unexpectedly",
 				client->set.host);
-		} else if (!client->handshake_failed) {
+		} else {
 			errstr = ssl_iostream_get_last_error(client->ssl_iostream);
 			if (errstr == NULL) {
 				errstr = client->input->stream_errno == 0 ? "EOF" :
@@ -429,7 +428,6 @@
 		}
 		return 0;
 	} else {
-		client->handshake_failed = TRUE;
 		*error_r = error;
 		return -1;
 	}


More information about the dovecot-cvs mailing list