Changeset 2858


Ignore:
Timestamp:
Aug 18, 2007, 11:32:07 PM (15 years ago)
Author:
charles
Message:

shut up a compiler warning

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tracker.c

    r2853 r2858  
    5252
    5353/* the number of peers that is our goal */
    54 #define NUMWANT 80
     54#define NUMWANT 50
    5555
    5656/* the length of the 'key' argument passed in tracker requests */
    57 #define TR_KEY_LEN 10
     57#define TR_KEY_LEN 20
    5858
    5959
     
    199199    }
    200200
     201fprintf( stderr, "got a connection to [%s] port [%d]: %p\n", address, port, val->evconn );
    201202    return val->evconn;
    202203}
     
    277278tr_trackerScrapeSoon( Tracker * t )
    278279{
     280#if 0
    279281    /* don't start more than one scrape at once for the same tracker... */
    280282    if( !tr_ptrArrayEmpty( t->scraping ) )
     
    283285    if( !t->scrapeTag )
    284286         t->scrapeTag = tr_timerNew( t->handle, onTrackerScrapeNow, t, NULL, 1000 );
     287#endif
    285288}
    286289
     
    362365    const uint8_t *end = in + in_len;
    363366    while( in != end )
    364         if( isalnum(*in) )
    365             *out++ = (char) *in++;
    366         else
    367             out += snprintf( out, 4, "%%%02X", (unsigned int)*in++ );
     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++ );
    368372    *out = '\0';
    369373}
     
    536540    snprintf( buf, sizeof(buf), "%s:%d", address->address, address->port );
    537541    evhttp_add_header( req->output_headers, "Host", buf );
     542    evhttp_add_header( req->output_headers, "User-Agent",
     543                                         TR_NAME "/" LONG_VERSION_STRING );
    538544    evhttp_add_header( req->output_headers, "Connection", "close" );
    539545    evhttp_add_header( req->output_headers, "Content-length", "0" );
    540     evhttp_add_header( req->output_headers, "User-Agent",
    541                                          TR_NAME "/" LONG_VERSION_STRING );
    542546}
    543547
     
    972976
    973977    evcon = getConnection( address->address, address->port );
    974     if ( !evcon )
     978    if ( !evcon ) {
    975979        tr_err( "Can't make a connection to %s:%d", address->address, address->port );
    976     else {
     980        tr_free( uri );
     981    } else {
    977982        tr_free( tor->lastRequest );
    978983        tor->lastRequest = tr_strdup( eventName );
  • trunk/libtransmission/trevent.c

    r2857 r2858  
    7070    struct evhttp_request * req;
    7171    enum evhttp_cmd_type type;
    72     const char * uri;
     72    char * uri;
    7373
    7474#ifdef DEBUG
Note: See TracChangeset for help on using the changeset viewer.