diff --git a/libtransmission/peer-io.c b/libtransmission/peer-io.c index 1714ce8a0..02ce56788 100644 --- a/libtransmission/peer-io.c +++ b/libtransmission/peer-io.c @@ -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 ) { diff --git a/libtransmission/peer-io.h b/libtransmission/peer-io.h index 2ecc3e816..58299978b 100644 --- a/libtransmission/peer-io.h +++ b/libtransmission/peer-io.h @@ -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 ); diff --git a/libtransmission/peer-msgs.c b/libtransmission/peer-msgs.c index b35f3c41b..21ec7fd74 100644 --- a/libtransmission/peer-msgs.c +++ b/libtransmission/peer-msgs.c @@ -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; }