(trunk libT) yet another assertion commit
This commit is contained in:
parent
15ecde281b
commit
69b8caa93b
|
@ -1484,10 +1484,10 @@ peerPrefersCrypto( const tr_peer * peer )
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
tr_peerMgrGetPeers( tr_peerMgr * manager,
|
tr_peerMgrGetPeers( tr_peerMgr * manager,
|
||||||
const uint8_t * torrentHash,
|
const uint8_t * torrentHash,
|
||||||
tr_pex ** setme_pex,
|
tr_pex ** setme_pex,
|
||||||
uint8_t af)
|
uint8_t af)
|
||||||
{
|
{
|
||||||
int peerCount = 0;
|
int peerCount = 0;
|
||||||
int peersReturning = 0;
|
int peersReturning = 0;
|
||||||
|
@ -1533,7 +1533,7 @@ tr_peerMgrGetPeers( tr_peerMgr * manager,
|
||||||
for( i=0; i<peersReturning; ++i )
|
for( i=0; i<peersReturning; ++i )
|
||||||
assert( tr_isAddress( &pex[i].addr ) );
|
assert( tr_isAddress( &pex[i].addr ) );
|
||||||
|
|
||||||
assert( ( walk - pex ) == peerCount );
|
assert( ( walk - pex ) == peersReturning );
|
||||||
qsort( pex, peersReturning, sizeof( tr_pex ), tr_pexCompare );
|
qsort( pex, peersReturning, sizeof( tr_pex ), tr_pexCompare );
|
||||||
|
|
||||||
#warning this for loop can be removed when we're sure the bug is fixed
|
#warning this for loop can be removed when we're sure the bug is fixed
|
||||||
|
|
Loading…
Reference in New Issue