Changeset 10506


Ignore:
Timestamp:
Apr 21, 2010, 4:44:35 AM (9 years ago)
Author:
charles
Message:

(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

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/handshake.c

    r10500 r10506  
    11441144tr_handshakeAbort( tr_handshake * handshake )
    11451145{
    1146     tr_handshakeDone( handshake, FALSE );
     1146    if( handshake != NULL )
     1147        tr_handshakeDone( handshake, FALSE );
    11471148}
    11481149
  • trunk/libtransmission/peer-msgs.c

    r10500 r10506  
    10701070            {
    10711071                int seedProbability = -1;
    1072                 if( added_f_len < n ) seedProbability = ( added_f[i] & ADDED_F_SEED_FLAG ) ? 100 : 0;
     1072                if( i < added_f_len ) seedProbability = ( added_f[i] & ADDED_F_SEED_FLAG ) ? 100 : 0;
    10731073                tr_peerMgrAddPex( tor, TR_PEER_FROM_PEX, pex+i, seedProbability );
    10741074            }
     
    10911091            {
    10921092                int seedProbability = -1;
    1093                 if( added_f_len < n ) seedProbability = ( added_f[i] & ADDED_F_SEED_FLAG ) ? 100 : 0;
     1093                if( i < added_f_len ) seedProbability = ( added_f[i] & ADDED_F_SEED_FLAG ) ? 100 : 0;
    10941094                tr_peerMgrAddPex( tor, TR_PEER_FROM_PEX, pex+i, seedProbability );
    10951095            }
Note: See TracChangeset for help on using the changeset viewer.