Changeset 9742


Ignore:
Timestamp:
Dec 13, 2009, 7:33:02 PM (12 years ago)
Author:
charles
Message:

(trunk libT) remove some more obsolete debug messages and other cruft from web.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/web.c

    r9740 r9742  
    108108    if( isScrape || isAnnounce )
    109109    {
    110         int sndbuf = 1024;
    111         int rcvbuf = isScrape ? 2048 : 3072;
    112 
    113         if( setsockopt( fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof(sndbuf) ) )
    114             tr_inf( "Unable to set SO_SNDBUF on socket %d: %s", fd, tr_strerror( sockerrno ) );
    115 
    116         if( setsockopt( fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf) ) )
    117             tr_inf( "Unable to set SO_RCVBUF on socket %d: %s", fd, tr_strerror( sockerrno ) );
     110        const int sndbuf = 1024;
     111        const int rcvbuf = isScrape ? 2048 : 3072;
     112        setsockopt( fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof(sndbuf) );
     113        setsockopt( fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf) );
    118114    }
    119115}
     
    142138        const long timeout = getTimeoutFromURL( task->url );
    143139        const long verbose = getenv( "TR_CURL_VERBOSE" ) != NULL;
     140        const char * user_agent = TR_NAME "/" LONG_VERSION_STRING;
    144141
    145142        dbgmsg( "adding task #%lu [%s]", task->tag, task->url );
     
    174171        curl_easy_setopt( easy, CURLOPT_SSL_VERIFYPEER, 0L );
    175172        curl_easy_setopt( easy, CURLOPT_URL, task->url );
    176         curl_easy_setopt( easy, CURLOPT_USERAGENT, TR_NAME "/" LONG_VERSION_STRING );
     173        curl_easy_setopt( easy, CURLOPT_USERAGENT, user_agent );
    177174        curl_easy_setopt( easy, CURLOPT_VERBOSE, verbose );
    178175        curl_easy_setopt( easy, CURLOPT_WRITEDATA, task );
     
    211208task_finish( struct tr_web_task * task, long response_code )
    212209{
    213     dbgmsg( "finished a web task... response code is %ld", response_code );
    214     dbgmsg( "===================================================" );
     210    dbgmsg( "finished web task %lu; got %ld", task->tag, response_code );
    215211
    216212    if( task->done_func != NULL )
     
    295291        mcode = curl_multi_socket_action( g->multi, fd, 0, &g->still_running );
    296292    } while( mcode == CURLM_CALL_MULTI_SOCKET );
    297     if( mcode != CURLM_OK )
    298         tr_err( "%s", curl_multi_strerror( mcode ) );
    299293
    300294    remove_finished_tasks( g );
Note: See TracChangeset for help on using the changeset viewer.