1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 16:52:39 +00:00

some assertions to smoke out the error that SoftwareElves is seeing

This commit is contained in:
Charles Kerr 2007-07-25 17:46:00 +00:00
parent c81f38360f
commit d84c2bd44a
2 changed files with 14 additions and 1 deletions

View file

@ -318,6 +318,9 @@ void tr_peerDestroy( tr_peer_t * peer )
tr_rcClose( peer->download );
tr_rcClose( peer->upload );
free( peer->client );
memset( peer, '\0', sizeof(tr_peer_t) );
free( peer );
}
@ -480,7 +483,12 @@ int tr_peerPulse( tr_peer_t * peer )
int ret, size;
uint8_t * p;
uint64_t date;
const int isSeeding = tr_cpGetStatus( tor->completion ) != TR_CP_INCOMPLETE;
int isSeeding;
assert( peer != NULL );
assert( peer->tor != NULL );
isSeeding = tr_cpGetStatus( tor->completion ) != TR_CP_INCOMPLETE;
if( ( ret = checkPeer( peer ) ) )
{

View file

@ -37,6 +37,11 @@ makeCommonPex( tr_torrent_t * tor, tr_peer_t * peer,
tr_peertree_entry_t * found;
benc_val_t val, * addval, * delval, * extra;
assert( tor != NULL );
assert( peer != NULL );
assert( retbuf != NULL );
assert( retlen != NULL );
*retbuf = NULL;
*retlen = 0;
sent = &peer->sentPeers;