some more disk io thread asserts

This commit is contained in:
Arvid Norberg 2014-07-12 22:09:20 +00:00
parent ddc406f853
commit d16fe60ca4
1 changed files with 3 additions and 0 deletions

View File

@ -1147,6 +1147,7 @@ void block_cache::insert_blocks(cached_piece_entry* pe, int block, file::iovec_t
INVARIANT_CHECK;
TORRENT_ASSERT(pe);
TORRENT_ASSERT(pe->in_use);
TORRENT_PIECE_ASSERT(iov_len > 0, pe);
#if TORRENT_USE_ASSERTS
@ -1159,6 +1160,8 @@ void block_cache::insert_blocks(cached_piece_entry* pe, int block, file::iovec_t
cache_hit(pe, j->requester, j->flags & disk_io_job::volatile_read);
TORRENT_ASSERT(pe->in_use);
for (int i = 0; i < iov_len; ++i, ++block)
{
// each iovec buffer has to be the size of a block (or the size of the last block)