Changeset 7738
- Timestamp:
- Jan 17, 2009, 10:49:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/web.c
r7721 r7738 126 126 } 127 127 128 curl_easy_setopt( easy, CURLOPT_DNS_CACHE_TIMEOUT, 360 0L );129 curl_easy_setopt( easy, CURLOPT_CONNECTTIMEOUT, 120L );128 curl_easy_setopt( easy, CURLOPT_DNS_CACHE_TIMEOUT, 360L ); 129 curl_easy_setopt( easy, CURLOPT_CONNECTTIMEOUT, 60L ); 130 130 curl_easy_setopt( easy, CURLOPT_FOLLOWLOCATION, 1L ); 131 131 curl_easy_setopt( easy, CURLOPT_FORBID_REUSE, 1L ); 132 curl_easy_setopt( easy, CURLOPT_MAXREDIRS, 16L ); 132 133 curl_easy_setopt( easy, CURLOPT_NOSIGNAL, 1L ); 133 134 curl_easy_setopt( easy, CURLOPT_PRIVATE, task ); … … 200 201 remove_finished_tasks( tr_web * g ) 201 202 { 202 for( ;; ) 203 CURL * easy; 204 205 do 203 206 { 204 int ignored; 205 CURLMsg * msg = curl_multi_info_read( g->multi, &ignored ); 206 207 if( msg == NULL ) 208 { 209 break; 210 } 211 else if( ( msg->msg == CURLMSG_DONE ) && ( msg->easy_handle != NULL ) ) 212 { 213 CURL * easy = msg->easy_handle; 207 CURLMsg * msg; 208 int msgs_left; 209 210 easy = NULL; 211 while(( msg = curl_multi_info_read( g->multi, &msgs_left ))) { 212 if( msg->msg == CURLMSG_DONE ) { 213 easy = msg->easy_handle; 214 break; 215 } 216 } 217 218 if( easy ) { 214 219 long code; 215 220 struct tr_web_task * task; 216 221 curl_easy_getinfo( easy, CURLINFO_PRIVATE, (void*)&task ); 217 222 curl_easy_getinfo( easy, CURLINFO_RESPONSE_CODE, &code ); 218 task_finish( task, code );219 223 curl_multi_remove_handle( g->multi, easy ); 220 224 curl_easy_cleanup( easy ); 221 } 222 } 225 task_finish( task, code ); 226 } 227 } 228 while ( easy ); 223 229 224 230 g->prev_running = g->still_running;
Note: See TracChangeset
for help on using the changeset viewer.