Ignore:
Timestamp:
Jun 21, 2007, 2:47:26 PM (15 years ago)
Author:
charles
Message:

adding experimental implementation of Tamilmani's `Swift' tit-for-tat algorithm for testing. To tweak or disable, change the values around line 50 of libtransmission/peer.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/shared.c

    r1725 r2177  
    294294        }
    295295
     296        tr_swiftPulse ( s->h );
     297
    296298        /* Wait up to 20 ms */
    297299        date2 = tr_date();
     
    383385{
    384386    tr_handle_t * h = s->h;
    385     tr_torrent_t * tor;
    386     uint8_t * hash;
    387387    int ii;
    388     uint64_t now = tr_date();
     388    const uint64_t now = tr_date();
    389389
    390390    for( ii = 0; ii < s->peerCount; )
    391391    {
    392         hash = tr_peerHash( s->peers[ii] );
     392        const uint8_t * hash = tr_peerHash( s->peers[ii] );
    393393
    394394        if( !hash && now > tr_peerDate( s->peers[ii] ) + 10000 )
     
    400400        if( hash )
    401401        {
     402            tr_torrent_t * tor;
     403
    402404            for( tor = h->torrentList; tor; tor = tor->next )
    403405            {
Note: See TracChangeset for help on using the changeset viewer.