mirror of
https://github.com/transmission/transmission
synced 2024-12-27 10:07:40 +00:00
dead code removal
This commit is contained in:
parent
0e91a7630d
commit
61258969c2
1 changed files with 0 additions and 10 deletions
|
@ -1536,7 +1536,6 @@ struct ChokeData
|
||||||
{
|
{
|
||||||
unsigned int doUnchoke : 1;
|
unsigned int doUnchoke : 1;
|
||||||
unsigned int isInterested : 1;
|
unsigned int isInterested : 1;
|
||||||
uint32_t rate;
|
|
||||||
tr_peer * peer;
|
tr_peer * peer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1573,20 +1572,12 @@ isSame( const tr_peer * peer )
|
||||||
***
|
***
|
||||||
**/
|
**/
|
||||||
|
|
||||||
static int
|
|
||||||
getWeightedRate( const tr_peer * peer, int clientIsSeed )
|
|
||||||
{
|
|
||||||
return (int)( 10.0 * ( clientIsSeed ? peer->rateToPeer
|
|
||||||
: peer->rateToClient ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rechoke( Torrent * t )
|
rechoke( Torrent * t )
|
||||||
{
|
{
|
||||||
int i, peerCount, size, unchokedInterested;
|
int i, peerCount, size, unchokedInterested;
|
||||||
tr_peer ** peers = getConnectedPeers( t, &peerCount );
|
tr_peer ** peers = getConnectedPeers( t, &peerCount );
|
||||||
struct ChokeData * choke = tr_new0( struct ChokeData, peerCount );
|
struct ChokeData * choke = tr_new0( struct ChokeData, peerCount );
|
||||||
const int clientIsSeed = tr_torrentIsSeed( t->tor );
|
|
||||||
|
|
||||||
assert( torrentIsLocked( t ) );
|
assert( torrentIsLocked( t ) );
|
||||||
|
|
||||||
|
@ -1600,7 +1591,6 @@ rechoke( Torrent * t )
|
||||||
struct ChokeData * node = &choke[size++];
|
struct ChokeData * node = &choke[size++];
|
||||||
node->peer = peer;
|
node->peer = peer;
|
||||||
node->isInterested = peer->peerIsInterested;
|
node->isInterested = peer->peerIsInterested;
|
||||||
node->rate = getWeightedRate( peer, clientIsSeed );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue