mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
(trunk libT) #2510: port messages not sent for outgoing peer connections
This commit is contained in:
parent
9c21268250
commit
d9e4ddab1f
1 changed files with 7 additions and 1 deletions
|
@ -312,7 +312,8 @@ parseHandshake( tr_handshake * handshake,
|
|||
|
||||
tr_peerIoEnableFEXT( handshake->io, HANDSHAKE_HAS_FASTEXT( reserved ) );
|
||||
|
||||
/* This doesn't depend on whether the torrent is private. */
|
||||
/* This is independent of whether or not DHT is actually used.
|
||||
* it's okay to set this flag even for private torrents */
|
||||
if( tor && tr_sessionAllowsDHT( tor->session ) )
|
||||
tr_peerIoEnableDHT( handshake->io, HANDSHAKE_HAS_DHT( reserved ) );
|
||||
|
||||
|
@ -674,6 +675,11 @@ readHandshake( tr_handshake * handshake,
|
|||
|
||||
tr_peerIoEnableFEXT( handshake->io, HANDSHAKE_HAS_FASTEXT( reserved ) );
|
||||
|
||||
/* This is independent of whether or not DHT is actually used.
|
||||
* it's okay to set this flag even for private torrents */
|
||||
if( tr_sessionAllowsDHT( handshake->session ) )
|
||||
tr_peerIoEnableDHT( handshake->io, HANDSHAKE_HAS_DHT( reserved ) );
|
||||
|
||||
/* torrent hash */
|
||||
tr_peerIoReadBytes( handshake->io, inbuf, hash, sizeof( hash ) );
|
||||
if( tr_peerIoIsIncoming( handshake->io ) )
|
||||
|
|
Loading…
Reference in a new issue