mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
dead code removal.
This commit is contained in:
parent
a5946e396c
commit
b704654275
3 changed files with 7 additions and 42 deletions
|
@ -32,7 +32,6 @@
|
|||
|
||||
struct tr_extensions
|
||||
{
|
||||
unsigned int azureusProtocolSupported : 1;
|
||||
unsigned int extendedProtocolSupported : 1;
|
||||
unsigned int fastPeersSupported : 1;
|
||||
};
|
||||
|
@ -353,15 +352,6 @@ tr_peerIoGetPeersId( const tr_peerIo * io )
|
|||
***
|
||||
**/
|
||||
|
||||
void
|
||||
tr_peerIoEnableAZMP( tr_peerIo * io, int flag )
|
||||
{
|
||||
assert( io != NULL );
|
||||
assert( flag==0 || flag==1 );
|
||||
|
||||
io->extensions.azureusProtocolSupported = flag;
|
||||
}
|
||||
|
||||
void
|
||||
tr_peerIoEnableLTEP( tr_peerIo * io, int flag )
|
||||
{
|
||||
|
@ -380,14 +370,6 @@ tr_peerIoEnableFEXT( tr_peerIo * io, int flag )
|
|||
io->extensions.fastPeersSupported = flag;
|
||||
}
|
||||
|
||||
int
|
||||
tr_peerIoSupportsAZMP( const tr_peerIo * io )
|
||||
{
|
||||
assert( io != NULL );
|
||||
|
||||
return io->extensions.azureusProtocolSupported;
|
||||
}
|
||||
|
||||
int
|
||||
tr_peerIoSupportsLTEP( const tr_peerIo * io )
|
||||
{
|
||||
|
|
|
@ -49,11 +49,9 @@ tr_handle* tr_peerIoGetHandle( tr_peerIo * io );
|
|||
***
|
||||
**/
|
||||
|
||||
void tr_peerIoEnableAZMP( tr_peerIo * io, int flag );
|
||||
void tr_peerIoEnableLTEP( tr_peerIo * io, int flag );
|
||||
void tr_peerIoEnableFEXT( tr_peerIo * io, int flag );
|
||||
|
||||
int tr_peerIoSupportsAZMP( const tr_peerIo * io );
|
||||
int tr_peerIoSupportsLTEP( const tr_peerIo * io );
|
||||
int tr_peerIoSupportsFEXT( const tr_peerIo * io );
|
||||
|
||||
|
|
|
@ -1668,26 +1668,12 @@ tr_peerMsgsNew( struct tr_torrent * torrent,
|
|||
tr_peerIoSetIOMode( m->io, EV_READ|EV_WRITE, 0 );
|
||||
ratePulse( m );
|
||||
|
||||
/**
|
||||
*** If we initiated this connection,
|
||||
*** we may need to send LTEP/AZMP handshakes.
|
||||
*** Otherwise we'll wait for the peer to send theirs first.
|
||||
**/
|
||||
if( !tr_peerIoIsIncoming( m->io ) )
|
||||
{
|
||||
if ( tr_peerIoSupportsLTEP( m->io ) ) {
|
||||
sendLtepHandshake( m );
|
||||
|
||||
} else if ( tr_peerIoSupportsAZMP( m->io ) ) {
|
||||
dbgmsg( m, "FIXME: need to send AZMP handshake" );
|
||||
|
||||
} else {
|
||||
/* no-op */
|
||||
}
|
||||
}
|
||||
|
||||
if ( tr_peerIoSupportsFEXT( m->io ) )
|
||||
{
|
||||
if ( tr_peerIoSupportsLTEP( m->io ) )
|
||||
sendLtepHandshake( m );
|
||||
|
||||
if ( !tr_peerIoSupportsFEXT( m->io ) )
|
||||
sendBitfield( m );
|
||||
else {
|
||||
/* This peer is fastpeer-enabled, send it have-all or have-none if appropriate */
|
||||
float completion = tr_cpPercentComplete( m->torrent->completion );
|
||||
if ( completion == 0.0f ) {
|
||||
|
@ -1701,9 +1687,8 @@ tr_peerMsgsNew( struct tr_torrent * torrent,
|
|||
|
||||
if ( peerProgress < MAX_ALLOWED_SET_COUNT )
|
||||
sendFastAllowedSet( m );
|
||||
} else {
|
||||
sendBitfield( m );
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue