aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-04-18 22:10:19 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-04-18 22:10:19 +0000
commit38898ba4afccae517df625e15e02004ad8d0178e (patch)
treebc0c0bb6942ec7250a50b6ad7ebb6e1f141e1de2
parent48f56d9600d14b963be992e0e25f355a299873bb (diff)
corrected the SSL timeout, as Ates Goral's patch did it and that works (opposed
to my previous brain-damaged version)
-rw-r--r--lib/ssluse.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 4a67b1124..1623f9822 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -1313,7 +1313,7 @@ Curl_ossl_connect_step1(struct connectdata *conn,
static CURLcode
Curl_ossl_connect_step2(struct connectdata *conn,
- int sockindex, long* timeout_ms)
+ int sockindex, long *timeout_ms)
{
struct SessionHandle *data = conn->data;
int err;
@@ -1328,15 +1328,17 @@ Curl_ossl_connect_step2(struct connectdata *conn,
Otherwise, figure out the most strict timeout of the two possible one
and then how much time that has elapsed to know how much time we
allow for the connect call */
- if(data->set.timeout || data->set.connecttimeout) {
-
+ if(data->set.timeout && data->set.connecttimeout) {
/* get the most strict timeout of the ones converted to milliseconds */
- if(data->set.timeout &&
- (data->set.timeout<data->set.connecttimeout))
+ if(data->set.timeout<data->set.connecttimeout)
*timeout_ms = data->set.timeout*1000;
else
*timeout_ms = data->set.connecttimeout*1000;
}
+ else if(data->set.timeout)
+ *timeout_ms = data->set.timeout*1000;
+ else if(data->set.connecttimeout)
+ *timeout_ms = data->set.connecttimeout*1000;
else
/* no particular time-out has been set */
*timeout_ms= DEFAULT_CONNECT_TIMEOUT;