]> granicus.if.org Git - curl/commitdiff
Scott Cantor filed bug report #1766320
authorDaniel Stenberg <daniel@haxx.se>
Thu, 2 Aug 2007 20:10:28 +0000 (20:10 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 2 Aug 2007 20:10:28 +0000 (20:10 +0000)
(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.

CHANGES
RELEASE-NOTES
lib/url.c

diff --git a/CHANGES b/CHANGES
index 106f01df88856bfe76e82ae4c55ab7a3c30f1d79..1580cc2cf071c452377b1a9343b97c0256fafa2e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,12 @@
                                   Changelog
 
 Daniel S (2 August 2007)
+- 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.
+
 - Dmitriy Sergeyev reported a regression: resumed file:// transfers broke
   after 7.16.2. This is much due to the different treatment file:// gets
   internally, but now I added test 231 to make it less likely to happen again
index bc3fe03cdf1700beec6148a5e6150eb43382e3dc..ffc8992eebcb8148681282aff151b5f1e00d2862 100644 (file)
@@ -33,6 +33,7 @@ This release includes the following bugfixes:
  o AIX 4 and 5 get to use non-blocking sockets
  o small POST with NTLM
  o resumed file:// transfers
+ o CURLOPT_DNS_CACHE_TIMEOUT and CURLOPT_DNS_USE_GLOBAL_CACHE are 64 bit "clean"
 
 This release includes the following known bugs:
 
@@ -54,6 +55,7 @@ advice from friends like these:
  Dan Fandrich, Song Ma, Daniel Black, Giancarlo Formicuccia, Shmulik Regev,
  Daniel Cater, Colin Hogben, Jofell Gallardo, Daniel Johnson,
  Ralf S. Engelschall, James Housley, Chris Flerackers, Patrick Monnerat,
- Jayesh A Shah, Greg Zavertnik, Peter O'Gorman, Greg Morse, Dmitriy Sergeyev
+ Jayesh A Shah, Greg Zavertnik, Peter O'Gorman, Greg Morse, Dmitriy Sergeyev,
+ Scott Cantor
  
         Thanks! (and sorry if I forgot to mention someone)
index 226e7be3b29516224c2150a0597754ce1ed2af44..35f8644b84f95e50ba03f8d821e5c19ee36aff92 100644 (file)
--- 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);
     }