Changeset 11312 for trunk/libtransmission/inout.c
- Timestamp:
- Oct 14, 2010, 5:12:12 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/inout.c
r11310 r11312 189 189 190 190 assert( tr_isTorrent( tor ) ); 191 192 if( offset >= tor->info.totalSize ) 193 { 194 tr_file_index_t i; 195 fprintf( stderr, "looking for torrent offset is %"PRIu64"\n", offset ); 196 fprintf( stderr, "total torrent size %"PRIu64"\n", tor->info.totalSize ); 197 fprintf( stderr, "pieceIndex %d\n", (int)pieceIndex ); 198 fprintf( stderr, "pieceOffset %d\n", (int)pieceOffset ); 199 fprintf( stderr, "piece size is %d\n", (int)tor->info.pieceSize ); 200 fprintf( stderr, "last piece size is %d\n", (int)tor->lastPieceSize ); 201 fprintf( stderr, "%u files\n", (unsigned int)tor->info.fileCount ); 202 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 ); 203 } 204 191 205 assert( offset < tor->info.totalSize ); 192 206 … … 194 208 tor->info.files, tor->info.fileCount, sizeof( tr_file ), 195 209 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 }207 210 208 211 assert( file != NULL );
Note: See TracChangeset
for help on using the changeset viewer.