Changeset 5974


Ignore:
Timestamp:
May 30, 2008, 12:58:55 PM (14 years ago)
Author:
charles
Message:

#980 optimistic unchoking is broken

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r5932 r5974  
    15331533rechoke( Torrent * t )
    15341534{
    1535     int i, n, peerCount, size, unchokedInterested;
     1535    int i, peerCount, size, unchokedInterested;
    15361536    tr_peer ** peers = getConnectedPeers( t, &peerCount );
    15371537    struct ChokeData * choke = tr_new0( struct ChokeData, peerCount );
     
    15751575            ++unchokedInterested;
    15761576    }
    1577     n = i;
    1578     while( i<size )
    1579         choke[i++].doUnchoke = 0;
    15801577
    15811578    /* optimistic unchoke */
     
    15941591        }
    15951592        i = tr_rand( tr_ptrArraySize( randPool ) );
    1596         c = ( struct ChokeData* )tr_ptrArrayNth( randPool, i);
     1593        c = tr_ptrArrayNth( randPool, i);
    15971594        c->doUnchoke = 1;
    15981595        t->optimistic = c->peer;
Note: See TracChangeset for help on using the changeset viewer.