Changeset 2859


Ignore:
Timestamp:
Aug 19, 2007, 12:02:23 AM (15 years ago)
Author:
charles
Message:

tracker tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tracker.c

    r2858 r2859  
    5252
    5353/* the number of peers that is our goal */
    54 #define NUMWANT 50
     54#define NUMWANT 75
    5555
    5656/* the length of the 'key' argument passed in tracker requests */
    57 #define TR_KEY_LEN 20
     57#define TR_KEY_LEN 10
    5858
    5959
     
    278278tr_trackerScrapeSoon( Tracker * t )
    279279{
    280 #if 0
    281280    /* don't start more than one scrape at once for the same tracker... */
    282281    if( !tr_ptrArrayEmpty( t->scraping ) )
     
    285284    if( !t->scrapeTag )
    286285         t->scrapeTag = tr_timerNew( t->handle, onTrackerScrapeNow, t, NULL, 1000 );
    287 #endif
    288286}
    289287
     
    365363    const uint8_t *end = in + in_len;
    366364    while( in != end )
    367 //        if( isalnum(*in) )
    368  //           *out++ = (char) *in++;
    369   //      else
    370             //out += snprintf( out, 4, "%%%02X", (unsigned int)*in++ );
    371             out += snprintf( out, 4, "%%%02x", (unsigned int)*in++ );
     365        if( isalnum(*in) )
     366            *out++ = (char) *in++;
     367        else
     368            out += snprintf( out, 4, "%%%02X", (unsigned int)*in++ );
    372369    *out = '\0';
    373370}
     
    540537    snprintf( buf, sizeof(buf), "%s:%d", address->address, address->port );
    541538    evhttp_add_header( req->output_headers, "Host", buf );
     539    evhttp_add_header( req->output_headers, "Connection", "close" );
     540    evhttp_add_header( req->output_headers, "Content-Length", "0" );
    542541    evhttp_add_header( req->output_headers, "User-Agent",
    543542                                         TR_NAME "/" LONG_VERSION_STRING );
    544     evhttp_add_header( req->output_headers, "Connection", "close" );
    545     evhttp_add_header( req->output_headers, "Content-length", "0" );
    546543}
    547544
Note: See TracChangeset for help on using the changeset viewer.