Changeset 9455


Ignore:
Timestamp:
Oct 31, 2009, 12:54:03 AM (13 years ago)
Author:
charles
Message:

(trunk libT) undo all the test commits for #2533 from r9445 through r9451. The problem appears to be an llvm issue, reported upstream @ apple dev center bug #7353773

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r9451 r9455  
    10461046    uint64_t total = 0;
    10471047    const tr_file * f = &tor->info.files[index];
    1048 fprintf( stderr, "in fileBytesCompleted for file #%d\n", (int)index );
    10491048
    10501049    if( f->length )
     
    10561055        if( firstBlock == lastBlock )
    10571056        {
    1058 fprintf( stderr, "file fits in a single block\n" );
    10591057            if( tr_cpBlockIsCompleteFast( &tor->completion, firstBlock ) )
    10601058                total = f->length;
     
    10621060        else
    10631061        {
    1064             //uint32_t i;
    10651062            tr_block_index_t i;
    10661063
     
    10721069            if( f->firstPiece == f->lastPiece )
    10731070            {
    1074 fprintf( stderr, "f->firstPiece == f->lastPiece\n" );
    10751071                for( i=firstBlock+1; i<lastBlock; ++i )
    10761072                    if( tr_cpBlockIsCompleteFast( &tor->completion, i ) )
     
    10871083
    10881084                /* the rest of the first piece */
    1089 fprintf( stderr, "looping on the rest of the first piece\n" );
    1090 fprintf( stderr, "firstBlock is %"PRIu64"\n", (uint64_t)firstBlock );
    1091 fprintf( stderr, "lastBlock is %"PRIu64"\n", (uint64_t)lastBlock );
    1092 fprintf( stderr, "lastBlockOfFirstPiece is %"PRIu64"\n", (uint64_t)lastBlockOfFirstPiece );
    1093                 //for( i=firstBlock+1; i<lastBlock && i<=lastBlockOfFirstPiece; ++i ) {
    1094                 for( i=firstBlock+1; i<lastBlock && i<=lastBlockOfFirstPiece; ) {
    1095 fprintf( stderr, "looping on i(1): %"PRIu64"\n", i );
    1096                 //    if( tr_cpBlockIsCompleteFast( &tor->completion, i ) ) {
    1097                 //        ++b;
    1098                 //    }
    1099                 ++i;
    1100 fprintf( stderr, "looping on i(2): %"PRIu64"\n", i );
    1101                 }
     1085                for( i=firstBlock+1; i<lastBlock && i<=lastBlockOfFirstPiece; ++i )
     1086                    if( tr_cpBlockIsCompleteFast( &tor->completion, i ) )
     1087                        ++b;
    11021088
    11031089                /* the middle pieces */
    1104 fprintf( stderr, "looking at the middle pieces\n" );
    11051090                if( f->firstPiece + 1 < f->lastPiece )
    11061091                    for( i=f->firstPiece+1; i<f->lastPiece; ++i )
     
    11081093
    11091094                /* the rest of the last piece */
    1110 fprintf( stderr, "looping on the rest of the last piece\n" );
    11111095                for( i=firstBlockOfLastPiece; i<lastBlock; ++i )
    11121096                    if( tr_cpBlockIsCompleteFast( &tor->completion, i ) )
     
    11221106        }
    11231107    }
    1124 fprintf( stderr, "finished fileBytesCompleted for file #%d\n", (int)index );
    11251108
    11261109    return total;
     
    11361119    tr_file_stat *        walk = files;
    11371120    const tr_bool         isSeed = tor->completeness == TR_SEED;
    1138 static int numCalls = 0;
    1139 
    1140 fprintf( stderr, "entering tr_torrentFiles for the %d time\n", ++numCalls );
    1141 
    1142     assert( tr_isTorrent( tor ) );
    1143 
    1144     for( i=0; i<n; ++i, ++walk )
    1145     {
    1146 fprintf( stderr, "looking at file #%d of %d\n", (int)i, (int)n );
     1121
     1122    assert( tr_isTorrent( tor ) );
     1123
     1124    for( i=0; i<n; ++i, ++walk ) {
    11471125        const uint64_t b = isSeed ? tor->info.files[i].length : fileBytesCompleted( tor, i );
    1148 fprintf( stderr, "file has %"PRIu64" out of %"PRIu64" bytes\n", b, tor->info.files[i].length );
    11491126        walk->bytesCompleted = b;
    11501127        walk->progress = tr_getRatio( b, tor->info.files[i].length );
    1151 fprintf( stderr, "walk->progress is %f\n", walk->progress );
    11521128    }
    11531129
    11541130    if( fileCount )
    11551131        *fileCount = n;
    1156 
    1157 fprintf( stderr, "tr_torrentFiles finished\n" );
    11581132
    11591133    return files;
Note: See TracChangeset for help on using the changeset viewer.