Changeset 7557


Ignore:
Timestamp:
Dec 31, 2008, 2:28:20 PM (12 years ago)
Author:
charles
Message:

(trunk libT) this diff has held #1631 at bay for 18 hours now... is it finally fixed? :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/web.c

    r7536 r7557  
    129129        curl_easy_setopt( easy, CURLOPT_CONNECTTIMEOUT, 120L );
    130130        curl_easy_setopt( easy, CURLOPT_FOLLOWLOCATION, 1L );
    131         curl_easy_setopt( easy, CURLOPT_FORBID_REUSE, 1L );
    132         curl_easy_setopt( easy, CURLOPT_MAXREDIRS, 16L );
    133131        curl_easy_setopt( easy, CURLOPT_NOSIGNAL, 1L );
    134132        curl_easy_setopt( easy, CURLOPT_PRIVATE, task );
    135133        curl_easy_setopt( easy, CURLOPT_SSL_VERIFYHOST, 0L );
    136134        curl_easy_setopt( easy, CURLOPT_SSL_VERIFYPEER, 0L );
    137         curl_easy_setopt( easy, CURLOPT_TIMEOUT, 240L );
    138135        curl_easy_setopt( easy, CURLOPT_URL, task->url );
    139136        curl_easy_setopt( easy, CURLOPT_USERAGENT,
     
    282279   after calling this function */
    283280static void
    284 tr_multi_socket_action( tr_web * g, int fd, int mask )
     281tr_multi_socket_action( tr_web * g, int fd )
    285282{
    286283    int closed = FALSE;
     
    292289    /* invoke libcurl's processing */
    293290    do {
    294         rc = curl_multi_socket_action( g->multi, fd, mask, &g->still_running );
    295         dbgmsg( "event_cb(): fd %d, mask %d, still_running is %d",
    296                 fd, mask, g->still_running );
     291        rc = curl_multi_socket_action( g->multi, fd, 0, &g->still_running );
     292        dbgmsg( "event_cb(): fd %d, still_running is %d",
     293                fd, g->still_running );
    297294    } while( rc == CURLM_CALL_MULTI_PERFORM );
    298295    if( rc != CURLM_OK )
     
    319316/* libevent says that sock is ready to be processed, so wake up libcurl */
    320317static void
    321 event_cb( int fd, short kind, void * g )
    322 {
    323     int error;
    324     int mask;
    325     socklen_t errsz;
    326 
    327     error = 0;
    328     errsz = sizeof( error );
    329     getsockopt( fd, SOL_SOCKET, SO_ERROR, &error, &errsz );
    330     if( error )
    331         mask = CURL_CSELECT_ERR;
    332     else {
    333         mask = 0;
    334         if( kind & EV_READ  ) mask |= CURL_CSELECT_IN;
    335         if( kind & EV_WRITE ) mask |= CURL_CSELECT_OUT;
    336     }
    337 
    338     tr_multi_socket_action( g, fd, mask );
     318event_cb( int fd, short kind UNUSED, void * g )
     319{
     320    tr_multi_socket_action( g, fd );
    339321}
    340322
     
    344326{
    345327    dbgmsg( "libevent timer is done" );
    346     tr_multi_socket_action( g, CURL_SOCKET_TIMEOUT, 0 );
     328    tr_multi_socket_action( g, CURL_SOCKET_TIMEOUT );
    347329}
    348330
Note: See TracChangeset for help on using the changeset viewer.