aboutsummaryrefslogtreecommitdiff
path: root/lib/socks.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-02-05 22:51:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-02-05 22:51:32 +0000
commit91386937ff120d11f7bf24dc487f00751362a61c (patch)
tree9affbbce6d62c6082ef11430b84f6c6eaa071de7 /lib/socks.c
parent0fc51ac5a6e9cca55398cabfafd4effdb3df21fe (diff)
- Michael Wallner provided a patch that adds support for CURLOPT_TIMEOUT_MS
and CURLOPT_CONNECTTIMEOUT_MS that, as their names should hint, do the timeouts with millisecond resolution instead. The only restriction to that is the alarm() (sometimes) used to abort name resolves as that uses full seconds. I fixed the FTP response timeout part of the patch. Internally we now count and keep the timeouts in milliseconds but it also means we multiply set timeouts with 1000. The effect of this is that no timeout can be set to more than 2^31 milliseconds (on 32 bit systems), which equals 24.86 days. We probably couldn't before either since the code did *1000 on the timeout values on several places already.
Diffstat (limited to 'lib/socks.c')
-rw-r--r--lib/socks.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/socks.c b/lib/socks.c
index 3319e697e..32d0c4b54 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -120,14 +120,14 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
/* get timeout */
if(data->set.timeout && data->set.connecttimeout) {
if (data->set.timeout < data->set.connecttimeout)
- timeout = data->set.timeout*1000;
+ timeout = data->set.timeout;
else
- timeout = data->set.connecttimeout*1000;
+ timeout = data->set.connecttimeout;
}
else if(data->set.timeout)
- timeout = data->set.timeout*1000;
+ timeout = data->set.timeout;
else if(data->set.connecttimeout)
- timeout = data->set.connecttimeout*1000;
+ timeout = data->set.connecttimeout;
else
timeout = DEFAULT_CONNECT_TIMEOUT;