From: Timo Sirainen Date: Thu, 4 Apr 2013 15:18:50 +0000 (+0300) Subject: imapc, pop3c: Don't hide SSL handshake errors. X-Git-Tag: 2.2.rc4~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=355384821d16af96455f008243e69f6a11822513;p=thirdparty%2Fdovecot%2Fcore.git imapc, pop3c: Don't hide SSL handshake errors. --- diff --git a/src/lib-imap-client/imapc-connection.c b/src/lib-imap-client/imapc-connection.c index 2ffc3c8312..391a133184 100644 --- a/src/lib-imap-client/imapc-connection.c +++ b/src/lib-imap-client/imapc-connection.c @@ -116,7 +116,6 @@ struct imapc_connection { 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 @@ static void imapc_connection_input(struct imapc_connection *conn) 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 @@ static int imapc_connection_ssl_handshaked(const char **error_r, void *context) } return 0; } else { - conn->handshake_failed = TRUE; *error_r = error; return -1; } diff --git a/src/lib-storage/index/pop3c/pop3c-client.c b/src/lib-storage/index/pop3c/pop3c-client.c index b6402bfff1..2949e932fa 100644 --- a/src/lib-storage/index/pop3c/pop3c-client.c +++ b/src/lib-storage/index/pop3c/pop3c-client.c @@ -61,7 +61,6 @@ struct pop3c_client { const char *input_line; struct istream *dot_input; - unsigned int handshake_failed:1; unsigned int running:1; }; @@ -396,7 +395,7 @@ static void pop3c_client_prelogin_input(struct pop3c_client *client) 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 @@ static int pop3c_client_ssl_handshaked(const char **error_r, void *context) } return 0; } else { - client->handshake_failed = TRUE; *error_r = error; return -1; }