aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2012-10-24 11:47:32 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-11-06 19:42:37 +0100
commit2045d83dd3f478f7bb8ef86959a82c96235b2bca (patch)
treeae4db7f1027d71a2a0bce8f54c63c793d9cf2c29
parent0da6c113ce805446f1d6b131b991b9a8c403ff5f (diff)
gnutls: fix the error_is_fatal logic
-rw-r--r--lib/gtls.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gtls.c b/lib/gtls.c
index f5f95aef8..dbf568c44 100644
--- a/lib/gtls.c
+++ b/lib/gtls.c
@@ -299,21 +299,21 @@ static CURLcode handshake(struct connectdata *conn,
connssl->connecting_state =
gnutls_record_get_direction(session)?
ssl_connect_2_writing:ssl_connect_2_reading;
+ continue;
if(nonblocking)
return CURLE_OK;
}
- else if((rc < 0) && gnutls_error_is_fatal(rc)) {
+ else if((rc < 0) && !gnutls_error_is_fatal(rc)) {
failf(data, "gnutls_handshake() warning: %s", gnutls_strerror(rc));
}
else if(rc < 0) {
failf(data, "gnutls_handshake() failed: %s", gnutls_strerror(rc));
return CURLE_SSL_CONNECT_ERROR;
}
- else {
- /* Reset our connect state machine */
- connssl->connecting_state = ssl_connect_1;
- return CURLE_OK;
- }
+
+ /* Reset our connect state machine */
+ connssl->connecting_state = ssl_connect_1;
+ return CURLE_OK;
}
}