1
0
Fork 0
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:
Charles Kerr 2009-10-22 01:03:17 +00:00
parent 9c21268250
commit d9e4ddab1f

View file

@ -312,7 +312,8 @@ parseHandshake( tr_handshake * handshake,
tr_peerIoEnableFEXT( handshake->io, HANDSHAKE_HAS_FASTEXT( reserved ) ); 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 ) ) if( tor && tr_sessionAllowsDHT( tor->session ) )
tr_peerIoEnableDHT( handshake->io, HANDSHAKE_HAS_DHT( reserved ) ); tr_peerIoEnableDHT( handshake->io, HANDSHAKE_HAS_DHT( reserved ) );
@ -674,6 +675,11 @@ readHandshake( tr_handshake * handshake,
tr_peerIoEnableFEXT( handshake->io, HANDSHAKE_HAS_FASTEXT( reserved ) ); 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 */ /* torrent hash */
tr_peerIoReadBytes( handshake->io, inbuf, hash, sizeof( hash ) ); tr_peerIoReadBytes( handshake->io, inbuf, hash, sizeof( hash ) );
if( tr_peerIoIsIncoming( handshake->io ) ) if( tr_peerIoIsIncoming( handshake->io ) )