- Timestamp:
- Feb 10, 2009, 6:03:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/web.c
r7838 r7866 282 282 283 283 mcode = curl_multi_remove_handle( g->multi, easy ); 284 tr_assert( mcode == CURLM_OK, "curl_multi_ socket_action() failed: %d (%s)", mcode, curl_multi_strerror( mcode ) );284 tr_assert( mcode == CURLM_OK, "curl_multi_remove_handle() failed: %d (%s)", mcode, curl_multi_strerror( mcode ) ); 285 285 286 286 curl_easy_cleanup( easy ); … … 337 337 after calling this function */ 338 338 static void 339 tr_multi_ socket_action( tr_web * g, int fd)339 tr_multi_perform( tr_web * g ) 340 340 { 341 341 int closed = FALSE; … … 347 347 /* invoke libcurl's processing */ 348 348 do { 349 mcode = curl_multi_socket_action( g->multi, fd, 0, &g->still_running ); 350 dbgmsg( "event_cb(): fd %d, still_running is %d", fd, g->still_running ); 349 dbgmsg( "calling curl_multi_perform..." ); 350 mcode = curl_multi_perform( g->multi, &g->still_running ); 351 dbgmsg( "done calling curl_multi_perform..." ); 351 352 } while( mcode == CURLM_CALL_MULTI_PERFORM ); 352 if( ( mcode == CURLM_BAD_SOCKET ) && ( fd != CURL_SOCKET_TIMEOUT ) ) 353 purgeSockinfo( g, fd ); 354 else { 355 tr_assert( mcode == CURLM_OK, "curl_multi_socket_action() failed on fd %d: %d (%s)", fd, mcode, curl_multi_strerror( mcode ) ); 356 if( mcode != CURLM_OK ) 357 tr_err( "%s", curl_multi_strerror( mcode ) ); 358 } 353 tr_assert( mcode == CURLM_OK, "curl_multi_perform() failed: %d (%s)", mcode, curl_multi_strerror( mcode ) ); 354 if( mcode != CURLM_OK ) 355 tr_err( "%s", curl_multi_strerror( mcode ) ); 359 356 360 357 remove_finished_tasks( g ); … … 375 372 /* libevent says that sock is ready to be processed, so wake up libcurl */ 376 373 static void 377 event_cb( int fd , short kind UNUSED, void * g )378 { 379 tr_multi_ socket_action( g, fd);374 event_cb( int fd UNUSED, short kind UNUSED, void * g ) 375 { 376 tr_multi_perform( g ); 380 377 } 381 378 … … 385 382 { 386 383 dbgmsg( "libevent timer is done" ); 387 tr_multi_ socket_action( g, CURL_SOCKET_TIMEOUT);384 tr_multi_perform( g ); 388 385 } 389 386
Note: See TracChangeset
for help on using the changeset viewer.