mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
if we haven't advertised that we support pex, then even if a peer sends us a pex message, don't send one back.
This commit is contained in:
parent
b6b339e25a
commit
c3dce15a9e
1 changed files with 7 additions and 2 deletions
|
@ -735,6 +735,7 @@ sendLtepHandshake( tr_peermsgs * msgs )
|
||||||
#if 0
|
#if 0
|
||||||
dbgmsg( msgs, "here is the ltep handshake we sent:" );
|
dbgmsg( msgs, "here is the ltep handshake we sent:" );
|
||||||
tr_bencPrint( &val );
|
tr_bencPrint( &val );
|
||||||
|
dbgmsg( msgs, "here is the ltep handshake we read [%s]:", tr_bencSave( &val, NULL ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
|
@ -761,6 +762,7 @@ parseLtepHandshake( tr_peermsgs * msgs, int len, struct evbuffer * inbuf )
|
||||||
#if 0
|
#if 0
|
||||||
dbgmsg( msgs, "here is the ltep handshake we read:" );
|
dbgmsg( msgs, "here is the ltep handshake we read:" );
|
||||||
tr_bencPrint( &val );
|
tr_bencPrint( &val );
|
||||||
|
dbgmsg( msgs, "here is the ltep handshake we read [%s]:", tr_bencSave( &val, NULL ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* does the peer prefer encrypted connections? */
|
/* does the peer prefer encrypted connections? */
|
||||||
|
@ -839,8 +841,11 @@ parseLtep( tr_peermsgs * msgs, int msglen, struct evbuffer * inbuf )
|
||||||
{
|
{
|
||||||
dbgmsg( msgs, "got ltep handshake" );
|
dbgmsg( msgs, "got ltep handshake" );
|
||||||
parseLtepHandshake( msgs, msglen, inbuf );
|
parseLtepHandshake( msgs, msglen, inbuf );
|
||||||
sendLtepHandshake( msgs );
|
if( tr_peerIoSupportsLTEP( msgs->io ) )
|
||||||
sendPex( msgs );
|
{
|
||||||
|
sendLtepHandshake( msgs );
|
||||||
|
sendPex( msgs );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( ltep_msgid == msgs->ut_pex_id )
|
else if( ltep_msgid == msgs->ut_pex_id )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue