Changeset 1134


Ignore:
Timestamp:
Nov 25, 2006, 4:32:25 PM (14 years ago)
Author:
livings124
Message:

send/store tracker id (even though few trackers actually send it)

Location:
branches/scrape/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/scrape/libtransmission/internal.h

    r1130 r1134  
    155155
    156156    char            * id;
     157    char            * trackerid;
    157158    char            * key;
    158159    int             * bindPort;
  • branches/scrape/libtransmission/tracker.c

    r1132 r1134  
    317317
    318318    char         * event;
     319    char         * trackerid;
    319320    uint64_t       left;
    320321    uint64_t       down;
     
    360361
    361362    left = tr_cpLeftBytes( tor->completion );
     363   
     364    trackerid = tor->trackerid ? ( "&trackerid=%s", tor->trackerid ) : "";
    362365
    363366    return tr_httpClient( TR_HTTP_GET, inf->trackerAddress,
     
    373376                          "numwant=%d&"
    374377                          "key=%s"
     378                          "%s"
    375379                          "%s",
    376380                          inf->trackerAnnounce, start, tor->escapedHashString, tc->id,
    377                           tc->bindPort, up, down, left, numwant, tor->key, event );
     381                          tc->bindPort, up, down, left, numwant, tor->key, trackerid, event );
    378382}
    379383
     
    498502        tc->hasManyPeers = 1;
    499503    }
    500 
     504   
     505    if( beFoo = tr_bencDictFind( &beAll, "tracker id" ) )
     506    {
     507        tor->trackerid = beFoo->val.s.s;
     508        tr_inf( "Tracker: tracker id = %s", tor->trackerid);
     509    }
     510   
    501511    if( !( bePeers = tr_bencDictFind( &beAll, "peers" ) ) )
    502512    {
Note: See TracChangeset for help on using the changeset viewer.