Changeset 10090


Ignore:
Timestamp:
Feb 3, 2010, 6:32:14 AM (12 years ago)
Author:
charles
Message:

(trunk libT) remove dead announce fields like supportscrypto and requirescrypto. these don't appear to be supported by any of the major clients so why waste the announce bandwidth...

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.c

    r10089 r10090  
    662662    struct evbuffer * buf = evbuffer_new( );
    663663    char * ret;
     664    const char * str;
    664665    const unsigned char * ipv6;
    665666
     
    674675                              "&numwant=%d"
    675676                              "&key=%s"
    676                               "&compact=1"
    677                               "&supportcrypto=1",
     677                              "&compact=1",
    678678                              ann,
    679679                              strchr( ann, '?' ) ? '&' : '?',
     
    690690        evbuffer_add_printf( buf, "&corrupt=%" PRIu64, torrent->corruptCur );
    691691
    692     if( !isStopping )
    693         evbuffer_add_printf( buf, "&upload_only=%d", tr_torrentIsSeed( torrent ) ? 1 : 0 );
    694 
    695     if( announcer->session->encryptionMode == TR_ENCRYPTION_REQUIRED )
    696         evbuffer_add_printf( buf, "&requirecrypto=1" );
    697 
    698     if( eventName && *eventName )
    699         evbuffer_add_printf( buf, "&event=%s", eventName );
    700 
    701     if( tracker->tracker_id && *tracker->tracker_id )
    702         evbuffer_add_printf( buf, "&trackerid=%s", tracker->tracker_id );
     692    str = eventName;
     693    if( str && *str )
     694        evbuffer_add_printf( buf, "&event=%s", str );
     695
     696    str = tracker->tracker_id;
     697    if( str && *str )
     698        evbuffer_add_printf( buf, "&trackerid=%s", str );
    703699
    704700    /* There are two incompatible techniques for announcing an IPv6 address.
     
    720716
    721717    ret = tr_strndup( EVBUFFER_DATA( buf ), EVBUFFER_LENGTH( buf ) );
     718    dbgmsg( tier, "announce URL is \"%s\"", ret );
    722719    evbuffer_free( buf );
    723 
    724     dbgmsg( tier, "announce URL is \"%s\"", ret );
    725720    return ret;
    726721}
     
    12691264        if( responseCode == 0 )
    12701265        {
    1271             const int interval = 120 + tr_cryptoWeakRandInt( 120 );
     1266            const int interval = tr_cryptoWeakRandInt( 120 );
    12721267            dbgmsg( tier, "No response from tracker... retrying in %d seconds.", interval );
    12731268            tier->manualAnnounceAllowedAt = ~(time_t)0;
  • trunk/libtransmission/web.c

    r10089 r10090  
    295295{
    296296    if( strstr( url, "scrape" ) != NULL ) return 20;
    297     if( strstr( url, "announce" ) != NULL ) return 45;
     297    if( strstr( url, "announce" ) != NULL ) return 60;
    298298    return 240;
    299299}
     
    322322        const int timeout = getTimeoutFromURL( task->url );
    323323        const long verbose = getenv( "TR_CURL_VERBOSE" ) != NULL;
    324         const char * user_agent = TR_NAME "/" LONG_VERSION_STRING;
     324        const char * user_agent = TR_NAME "/" SHORT_VERSION_STRING;
    325325        char * url = NULL;
    326326
     
    350350
    351351            task->slist = curl_slist_append( NULL, host );
     352            task->slist = curl_slist_append( task->slist, tr_strdup_printf( "Accept:" ) );
    352353            curl_easy_setopt( e, CURLOPT_HTTPHEADER, task->slist );
    353354            tr_free( host );
     
    386387        curl_easy_setopt( e, CURLOPT_FOLLOWLOCATION, 1L );
    387388        curl_easy_setopt( e, CURLOPT_AUTOREFERER, 1L );
    388         curl_easy_setopt( e, CURLOPT_MAXREDIRS, 4L );
    389         curl_easy_setopt( e, CURLOPT_NOSIGNAL, 1L );
    390389        curl_easy_setopt( e, CURLOPT_PRIVATE, task );
    391390        curl_easy_setopt( e, CURLOPT_SSL_VERIFYHOST, 0L );
Note: See TracChangeset for help on using the changeset viewer.