Changeset 11312


Ignore:
Timestamp:
Oct 14, 2010, 5:12:12 PM (11 years ago)
Author:
charles
Message:

(trunk libT) #3631 "crash in tr_ioFindFileLocation" -- more tracer messages for the testers @ https://forum.transmissionbt.com/viewtopic.php?p=49625#p49625

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/inout.c

    r11310 r11312  
    189189
    190190    assert( tr_isTorrent( tor ) );
     191
     192if( offset >= tor->info.totalSize )
     193{
     194tr_file_index_t i;
     195fprintf( stderr, "looking for torrent offset is %"PRIu64"\n", offset );
     196fprintf( stderr, "total torrent size %"PRIu64"\n", tor->info.totalSize );
     197fprintf( stderr, "pieceIndex %d\n", (int)pieceIndex );
     198fprintf( stderr, "pieceOffset %d\n", (int)pieceOffset );
     199fprintf( stderr, "piece size is %d\n", (int)tor->info.pieceSize );
     200fprintf( stderr, "last piece size is %d\n", (int)tor->lastPieceSize );
     201fprintf( stderr, "%u files\n", (unsigned int)tor->info.fileCount );
     202for( i=0; i<tor->info.fileCount; ++i ) fprintf( stderr, "file #%u offset %"PRIu64" length %"PRIu64"\n", i, tor->info.files[i].offset, tor->info.files[i].length );
     203}
     204
    191205    assert( offset < tor->info.totalSize );
    192206
     
    194208                    tor->info.files, tor->info.fileCount, sizeof( tr_file ),
    195209                    compareOffsetToFile );
    196 
    197 if( file == NULL ) {
    198 unsigned int i;
    199 fprintf( stderr, "%s", "transmission error\n" );
    200 fprintf( stderr, "pieceIndex %d\n", (int)pieceIndex );
    201 fprintf( stderr, "pieceOffset %d\n", (int)pieceOffset );
    202 fprintf( stderr, "couldn't find file matching offset %"PRIu64"\n", offset );
    203 fprintf( stderr, "total torrent size %"PRIu64"\n", tor->info.totalSize );
    204 fprintf( stderr, "%u files\n", (unsigned int)tor->info.fileCount );
    205 for( i=0; i<tor->info.fileCount; ++i ) fprintf( stderr, "file #%u offset %"PRIu64" length %"PRIu64"\n", i, tor->info.files[i].offset, tor->info.files[i].length );
    206 }
    207210
    208211    assert( file != NULL );
Note: See TracChangeset for help on using the changeset viewer.