1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +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:
Charles Kerr 2007-11-16 04:42:51 +00:00
parent b6b339e25a
commit c3dce15a9e

View file

@ -735,6 +735,7 @@ sendLtepHandshake( tr_peermsgs * msgs )
#if 0
dbgmsg( msgs, "here is the ltep handshake we sent:" );
tr_bencPrint( &val );
dbgmsg( msgs, "here is the ltep handshake we read [%s]:", tr_bencSave( &val, NULL ) );
#endif
/* cleanup */
@ -761,6 +762,7 @@ parseLtepHandshake( tr_peermsgs * msgs, int len, struct evbuffer * inbuf )
#if 0
dbgmsg( msgs, "here is the ltep handshake we read:" );
tr_bencPrint( &val );
dbgmsg( msgs, "here is the ltep handshake we read [%s]:", tr_bencSave( &val, NULL ) );
#endif
/* does the peer prefer encrypted connections? */
@ -839,8 +841,11 @@ parseLtep( tr_peermsgs * msgs, int msglen, struct evbuffer * inbuf )
{
dbgmsg( msgs, "got ltep handshake" );
parseLtepHandshake( msgs, msglen, inbuf );
sendLtepHandshake( msgs );
sendPex( msgs );
if( tr_peerIoSupportsLTEP( msgs->io ) )
{
sendLtepHandshake( msgs );
sendPex( msgs );
}
}
else if( ltep_msgid == msgs->ut_pex_id )
{