Changeset 10013
- Timestamp:
- Jan 25, 2010, 4:24:48 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/web.c
r10012 r10013 31 31 32 32 DEFAULT_TIMER_MSEC = 1500 /* arbitrary */ 33 34 MIN_DNS_CACHE_TIME = 60 * 60 * 24 33 35 }; 34 36 … … 160 162 161 163 if( item != NULL ) 162 dbgmsg( "found cached dns entry for \"%s\": %s", host, item->resolved_host ); 164 dbgmsg( "found cached dns entry for \"%s\": %s", 165 host, item->resolved_host ); 163 166 164 167 return item ? item->resolved_host : NULL; … … 166 169 167 170 static const char* 168 dns_set_cached_host( struct tr_web_task * task, const char * host, const char * resolved, int ttl ) 171 dns_set_cached_host( struct tr_web_task * task, const char * host, 172 const char * resolved, int ttl ) 169 173 { 170 174 char * ret = NULL; … … 175 179 assert( resolved != NULL ); 176 180 assert( ttl >= 0 ); 181 182 ttl = MAX( MIN_DNS_CACHE_TIME, ttl ); 177 183 178 184 g = task->session->web; … … 315 321 curl_easy_setopt( e, CURLOPT_WRITEDATA, task ); 316 322 curl_easy_setopt( e, CURLOPT_WRITEFUNCTION, writeFunc ); 317 curl_easy_setopt( e, CURLOPT_DNS_CACHE_TIMEOUT, 1800L);323 curl_easy_setopt( e, CURLOPT_DNS_CACHE_TIMEOUT, MIN_DNS_CACHE_TIME ); 318 324 curl_easy_setopt( e, CURLOPT_FOLLOWLOCATION, 1L ); 319 325 curl_easy_setopt( e, CURLOPT_AUTOREFERER, 1L );
Note: See TracChangeset
for help on using the changeset viewer.