mirror of
https://github.com/curl/curl.git
synced 2024-12-15 06:40:09 +08:00
urldata: store dns cache timeout in an int
68 years ought to be enough for most. Closes #9097
This commit is contained in:
parent
127d04aadf
commit
ccc8092b05
@ -246,7 +246,10 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
||||
arg = va_arg(param, long);
|
||||
if(arg < -1)
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.dns_cache_timeout = arg;
|
||||
else if(arg > INT_MAX)
|
||||
arg = INT_MAX;
|
||||
|
||||
data->set.dns_cache_timeout = (int)arg;
|
||||
break;
|
||||
case CURLOPT_DNS_USE_GLOBAL_CACHE:
|
||||
/* deprecated */
|
||||
|
@ -1743,7 +1743,7 @@ struct UserDefined {
|
||||
struct ssl_config_data proxy_ssl; /* user defined SSL stuff for proxy */
|
||||
#endif
|
||||
struct ssl_general_config general_ssl; /* general user defined SSL stuff */
|
||||
long dns_cache_timeout; /* DNS cache timeout */
|
||||
int dns_cache_timeout; /* DNS cache timeout (seconds) */
|
||||
long buffer_size; /* size of receive buffer to use */
|
||||
unsigned int upload_buffer_size; /* size of upload buffer to use,
|
||||
keep it >= CURL_MAX_WRITE_SIZE */
|
||||
|
Loading…
Reference in New Issue
Block a user