aboutsummaryrefslogtreecommitdiff
path: root/lib/ssluse.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-02-20 09:56:26 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-02-20 09:56:26 +0000
commit53a549000c3634f6b0a5ed262d5834c3145885d7 (patch)
tree53ed658f9b454a41bf4f1a4c62573f2f0db8e667 /lib/ssluse.c
parent55700cb01f4a01b8187f387e1655371e6fe0703a (diff)
- Based on initial work done by Gautam Kachroo to address a bug, we now keep
better control at the exact state of the connection's SSL status so that we know exactly when it has completed the SSL negotiation or not so that there won't be accidental re-uses of connections that are wrongly believed to be in SSL-completed-negotiate state.
Diffstat (limited to 'lib/ssluse.c')
-rw-r--r--lib/ssluse.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 1e9b48a49..ac6b057cb 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -1737,7 +1737,8 @@ ossl_connect_common(struct connectdata *conn,
connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
while(1) {
- int what = Curl_socket_ready(readfd, writefd, nonblocking?0:(int)timeout_ms);
+ int what = Curl_socket_ready(readfd, writefd,
+ nonblocking?0:(int)timeout_ms);
if(what > 0)
/* readable or writable, go loop in the outer loop */
break;
@@ -1775,11 +1776,11 @@ ossl_connect_common(struct connectdata *conn,
}
if(ssl_connect_done==connssl->connecting_state) {
+ connssl->state = ssl_connection_complete;
*done = TRUE;
}
- else {
+ else
*done = FALSE;
- }
/* Reset our connect state machine */
connssl->connecting_state = ssl_connect_1;