1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-03 13:03:50 +00:00

more assertion tests to tr_peerGotBlockFromUs() and tr_peerSentBlockToUs() to smoke out any remaining spurious ul/dl bytecounts

This commit is contained in:
Charles Kerr 2007-07-09 23:27:57 +00:00
parent bcb3cf99ab
commit 9c73ecbf63

View file

@ -828,6 +828,7 @@ tr_peerSentBlockToUs ( tr_peer_t * peer, int byteCount )
tr_torrent_t * tor = peer->tor; tr_torrent_t * tor = peer->tor;
assert( byteCount >= 0 ); assert( byteCount >= 0 );
assert( byteCount <= tor->info.pieceSize );
tor->downloadedCur += byteCount; tor->downloadedCur += byteCount;
tr_rcTransferred( peer->download, byteCount ); tr_rcTransferred( peer->download, byteCount );
@ -844,6 +845,7 @@ tr_peerGotBlockFromUs ( tr_peer_t * peer, int byteCount )
tr_torrent_t * tor = peer->tor; tr_torrent_t * tor = peer->tor;
assert( byteCount >= 0 ); assert( byteCount >= 0 );
assert( byteCount <= tor->info.pieceSize );
tor->uploadedCur += byteCount; tor->uploadedCur += byteCount;
tr_rcTransferred( peer->upload, byteCount ); tr_rcTransferred( peer->upload, byteCount );