]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imapc, pop3c: Don't hide SSL handshake errors.
authorTimo Sirainen <tss@iki.fi>
Thu, 4 Apr 2013 15:18:50 +0000 (18:18 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 4 Apr 2013 15:18:50 +0000 (18:18 +0300)
src/lib-imap-client/imapc-connection.c
src/lib-storage/index/pop3c/pop3c-client.c

index 2ffc3c8312db41f51f9835dbd8318dd6261e241c..391a133184efc5d8809f7fd21b76b0a26efadaad 100644 (file)
@@ -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;
        }
index b6402bfff1231b6c69dde714fd9981234a41059d..2949e932fa7d6fce2a87844bb4e0d6965bbc7f57 100644 (file)
@@ -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;
        }