Ignore:
Timestamp:
Jan 25, 2009, 4:14:11 PM (13 years ago)
Author:
charles
Message:

(trunk libT) new macro, tr_assert(). use it to help smoke out #1749

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/completion.c

    r7796 r7797  
    327327    const tr_block_index_t lastBlock = file->length ? ( ( file->offset + file->length - 1 ) / tor->blockSize ) : firstBlock;
    328328
    329     assert( tr_torBlockPiece( tor, firstBlock ) == file->firstPiece );
    330     assert( tr_torBlockPiece( tor, lastBlock ) == file->lastPiece );
     329    tr_assert( tr_torBlockPiece( tor, firstBlock ) == file->firstPiece,
     330               "file->offset %"PRIu64"; file->length %"PRIu64"; "
     331               "pieceSize %"PRIu32"; blockSize %"PRIu32"; "
     332               "firstBlock %"PRIu64"; lastBlock %"PRIu64,
     333               file->offset, file->length,
     334               tor->info.pieceSize, tor->blockSize,
     335               firstBlock, lastBlock );
     336
     337    tr_assert( tr_torBlockPiece( tor, lastBlock ) == file->lastPiece,
     338               "file->offset %"PRIu64"; file->length %"PRIu64"; "
     339               "pieceSize %"PRIu32"; blockSize %"PRIu32"; "
     340               "firstBlock %"PRIu64"; lastBlock %"PRIu64,
     341               file->offset, file->length,
     342               tor->info.pieceSize, tor->blockSize,
     343               firstBlock, lastBlock );
    331344
    332345    for( block=firstBlock; block<=lastBlock; ++block )
Note: See TracChangeset for help on using the changeset viewer.