(trunk libT) #3159 "better choosing of which peers to initiate new connections with" -- fix new bug in r10500 that was reported by Sharpshot in #3160
This commit is contained in:
parent
ceba9e6722
commit
25103d5198
|
@ -1143,6 +1143,7 @@ tr_handshakeDone( tr_handshake * handshake,
|
|||
void
|
||||
tr_handshakeAbort( tr_handshake * handshake )
|
||||
{
|
||||
if( handshake != NULL )
|
||||
tr_handshakeDone( handshake, FALSE );
|
||||
}
|
||||
|
||||
|
|
|
@ -1069,7 +1069,7 @@ parseUtPex( tr_peermsgs * msgs, int msglen, struct evbuffer * inbuf )
|
|||
for( i=0; i<n; ++i )
|
||||
{
|
||||
int seedProbability = -1;
|
||||
if( added_f_len < n ) seedProbability = ( added_f[i] & ADDED_F_SEED_FLAG ) ? 100 : 0;
|
||||
if( i < added_f_len ) seedProbability = ( added_f[i] & ADDED_F_SEED_FLAG ) ? 100 : 0;
|
||||
tr_peerMgrAddPex( tor, TR_PEER_FROM_PEX, pex+i, seedProbability );
|
||||
}
|
||||
|
||||
|
@ -1090,7 +1090,7 @@ parseUtPex( tr_peermsgs * msgs, int msglen, struct evbuffer * inbuf )
|
|||
for( i=0; i<n; ++i )
|
||||
{
|
||||
int seedProbability = -1;
|
||||
if( added_f_len < n ) seedProbability = ( added_f[i] & ADDED_F_SEED_FLAG ) ? 100 : 0;
|
||||
if( i < added_f_len ) seedProbability = ( added_f[i] & ADDED_F_SEED_FLAG ) ? 100 : 0;
|
||||
tr_peerMgrAddPex( tor, TR_PEER_FROM_PEX, pex+i, seedProbability );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue