diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-02-07 22:25:04 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-02-07 22:25:04 +0000 |
commit | 1b701c746f66b8fd5bf3017c36254dbde8456df2 (patch) | |
tree | 9ce8d20c20100c4fb9bbec0966928641f9f910b7 /lib/qssl.c | |
parent | 15bf16852705a585b694cb0d50d21f7edd6b7a88 (diff) | |
download | curl-1b701c746f66b8fd5bf3017c36254dbde8456df2.tar.gz |
- Refactored a lot of timeout code into a few functions in an attempt to make
them all use the same (hopefully correct) logic to make it less error-prone
and easier to introduce library-wide where it should be used.
Diffstat (limited to 'lib/qssl.c')
-rw-r--r-- | lib/qssl.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/qssl.c b/lib/qssl.c index 4ced8b744..e65a0e2f6 100644 --- a/lib/qssl.c +++ b/lib/qssl.c @@ -172,17 +172,8 @@ static CURLcode Curl_qsossl_handshake(struct connectdata * conn, int sockindex) if(!data->set.ssl.verifyhost) h->exitPgm = Curl_qsossl_trap_cert; - if(data->set.connecttimeout) { - timeout_ms = data->set.connecttimeout; - - if(data->set.timeout) - if(timeout_ms > data->set.timeout) - timeout_ms = data->set.timeout; - } - else if(data->set.timeout) - timeout_ms = data->set.timeout; - else - timeout_ms = DEFAULT_CONNECT_TIMEOUT; + /* figure out how long time we should wait at maximum */ + timeout_ms = Curl_timeleft(conn, NULL, TRUE); /* SSL_Handshake() timeout resolution is second, so round up. */ |