Changeset 12653


Ignore:
Timestamp:
Aug 8, 2011, 4:58:29 PM (10 years ago)
Author:
jordan
Message:

remove dead code

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bandwidth.c

    r12509 r12653  
    159159****
    160160***/
    161 #if 0
    162 #warning do not check the code in with this enabled
    163 #define DEBUG_DIRECTION TR_UP
    164 #endif
    165161
    166162static void
     
    181177        const unsigned int nextPulseSpeed = b->band[dir].desiredSpeed_Bps;
    182178        b->band[dir].bytesLeft = ( nextPulseSpeed * period_msec ) / 1000u;
    183 
    184 #ifdef DEBUG_DIRECTION
    185         if( dir == DEBUG_DIRECTION )
    186                 fprintf( stderr, "bandwidth %p currentPieceSpeed(%5.2f of %5.2f) desiredSpeed(%5.2f), allocating %d\n",
    187                          b, currentSpeed, tr_bandwidthGetRawSpeed( b, dir ), desiredSpeed,
    188                          b->band[dir].bytesLeft );
    189 #endif
    190179    }
    191180
     
    195184        tr_ptrArrayAppend( peer_pool, b->peer );
    196185    }
    197 
    198 #ifdef DEBUG_DIRECTION
    199 if( ( dir == DEBUG_DIRECTION ) && ( n > 1 ) )
    200 fprintf( stderr, "bandwidth %p has %d peers\n", b, n );
    201 #endif
    202186
    203187    /* traverse & repeat for the subtree */
  • trunk/libtransmission/cache.c

    r12204 r12653  
    172172    const uint32_t offset        = b->offset;
    173173
    174 //fprintf( stderr, "flushing %d contiguous blocks [%d-%d) from cache to disk\n", n, pos, n+pos );
    175 
    176174    for( i=pos; i<pos+n; ++i ) {
    177175        b = blocks[i];
     
    182180    }
    183181    tr_ptrArrayErase( &cache->blocks, pos, pos+n );
    184 
    185 #if 0
    186     tr_tordbg( tor, "Writing to disk piece %d, offset %d, len %d", (int)piece, (int)offset, (int)(walk-buf) );
    187     tr_ndbg( MY_NAME, "Removing %d blocks from cache, rank: %d - %d left", n, rank, tr_ptrArraySize(&cache->blocks) );
    188     fprintf( stderr, "%s - Writing to disk piece %d, offset %d, len %d\n", tr_torrentName(tor), (int)piece, (int)offset, (int)(walk-buf) );
    189     fprintf( stderr, "%s - Removing %d blocks from cache; %d left\n", MY_NAME, n, tr_ptrArraySize(&cache->blocks) );
    190 #endif
    191182
    192183    err = tr_ioWrite( tor, piece, offset, walk-buf, buf );
  • trunk/libtransmission/peer-mgr.c

    r12617 r12653  
    22602260    return 0;
    22612261}
    2262 
    2263 #if 0
    2264 static int
    2265 peerPrefersCrypto( const tr_peer * peer )
    2266 {
    2267     if( peer->encryption_preference == ENCRYPTION_PREFERENCE_YES )
    2268         return true;
    2269 
    2270     if( peer->encryption_preference == ENCRYPTION_PREFERENCE_NO )
    2271         return false;
    2272 
    2273     return tr_peerIoIsEncrypted( peer->io );
    2274 }
    2275 #endif
    22762262
    22772263/* better goes first */
  • trunk/qt/torrent-filter.cc

    r12611 r12653  
    197197    }
    198198
    199 #if 0
    200     if( accepts && !myText.isEmpty( ) ) switch( myTextMode )
    201     {
    202         case FILTER_BY_NAME:
    203             accepts = tor->name().contains( myText, Qt::CaseInsensitive );
    204             break;
    205         case FILTER_BY_FILES:
    206             accepts = tor->hasFileSubstring( myText );
    207             break;
    208         case FILTER_BY_TRACKER:
    209             accepts = tor->hasTrackerSubstring( myText );
    210             break;
    211     }
    212 #endif
    213 
    214199    return accepts;
    215200}
Note: See TracChangeset for help on using the changeset viewer.