aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-08-02 20:10:28 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-08-02 20:10:28 +0000
commit5ec786b02e0b460320b9bb4d75f5ddb8b1016656 (patch)
treea00cf916fd8ac6cf1956b9490733c66a5d8c133b /lib/url.c
parent035ee257c8fd20652c5de2581ef46958e563a5e0 (diff)
Scott Cantor filed bug report #1766320
(http://curl.haxx.se/bug/view.cgi?id=1766320) pointing out that the libcurl code accessed two curl_easy_setopt() options (CURLOPT_DNS_CACHE_TIMEOUT and CURLOPT_DNS_USE_GLOBAL_CACHE) as ints even though they're documented to be passed in as longs, and that makes a difference on 64 bit architectures.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/url.c b/lib/url.c
index 226e7be3b..35f8644b8 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -690,14 +690,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
switch(option) {
case CURLOPT_DNS_CACHE_TIMEOUT:
- data->set.dns_cache_timeout = va_arg(param, int);
+ data->set.dns_cache_timeout = va_arg(param, long);
break;
case CURLOPT_DNS_USE_GLOBAL_CACHE:
{
- int use_cache = va_arg(param, int);
- if (use_cache) {
+ long use_cache = va_arg(param, long);
+ if (use_cache)
Curl_global_host_cache_init();
- }
data->set.global_dns_cache = (bool)(0 != use_cache);
}