Changeset 9548


Ignore:
Timestamp:
Nov 23, 2009, 9:57:10 PM (12 years ago)
Author:
charles
Message:

(trunk) remove dead code

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/details.c

    r9506 r9548  
    21802180
    21812181        file_list_set_torrent( di->file_list, id );
    2182         //tracker_list_set_torrent( di->tracker_list, id );
    21832182    }
    21842183   else
    21852184   {
    21862185        file_list_clear( di->file_list );
    2187         //tracker_list_clear( di->tracker_list );
    21882186        g_snprintf( title, sizeof( title ), _( "%'d Torrent Properties" ), len );
    21892187    }
  • trunk/libtransmission/JSON_parser.c

    r9480 r9548  
    7272#ifdef _MSC_VER
    7373#   if _MSC_VER >= 1400 /* Visual Studio 2005 and up */
    74 #      pragma warning(disable:4996) // unsecure sscanf
     74#      pragma warning(disable:4996) /* unsecure sscanf */
    7575#   endif
    7676#endif
  • trunk/libtransmission/bandwidth.c

    r9515 r9548  
    120120    assert( b != parent );
    121121
    122 //fprintf( stderr, "setting parent for %p: %p\n", b, parent );
    123122    if( b->parent )
    124123    {
     
    130129        assert( removed == b );
    131130        assert( tr_ptrArrayFindSorted( &b->parent->children, b, comparePointers ) == NULL );
    132 //fprintf( stderr, "removed child bandwidth %p from old parent %p\n", b, b->parent );
    133131
    134132        b->parent = NULL;
     
    142140        tr_ptrArrayInsertSorted( &parent->children, b, comparePointers );
    143141        assert( tr_ptrArrayFindSorted( &parent->children, b, comparePointers ) == b );
    144 //fprintf( stderr, "set new parent for %p: %p\n", b, parent );
    145142        b->parent = parent;
    146143    }
     
    150147****
    151148***/
    152 
    153149#if 0
    154150#warning do not check the code in with this enabled
  • trunk/libtransmission/magnet.c

    r9544 r9548  
    2929static const int base32Lookup[] =
    3030{
    31     0xFF,0xFF,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, // '0', '1', '2', '3', '4', '5', '6', '7'
    32     0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, // '8', '9', ':', ';', '<', '=', '>', '?'
    33     0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06, // '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G'
    34     0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E, // 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O'
    35     0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16, // 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W'
    36     0x17,0x18,0x19,0xFF,0xFF,0xFF,0xFF,0xFF, // 'X', 'Y', 'Z', '[', '\', ']', '^', '_'
    37     0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06, // '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g'
    38     0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E, // 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o'
    39     0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16, // 'p', 'q', 'r', 's', 't', 'u', 'v', 'w'
    40     0x17,0x18,0x19,0xFF,0xFF,0xFF,0xFF,0xFF  // 'x', 'y', 'z', '{', '|', '}', '~', 'DEL'
     31    0xFF,0xFF,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, /* '0', '1', '2', '3', '4', '5', '6', '7' */
     32    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, /* '8', '9', ':', ';', '<', '=', '>', '?' */
     33    0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06, /* '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G' */
     34    0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E, /* 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O' */
     35    0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16, /* 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W' */
     36    0x17,0x18,0x19,0xFF,0xFF,0xFF,0xFF,0xFF, /* 'X', 'Y', 'Z', '[', '\', ']', '^', '_' */
     37    0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06, /* '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g' */
     38    0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E, /* 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o' */
     39    0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16, /* 'p', 'q', 'r', 's', 't', 'u', 'v', 'w' */
     40    0x17,0x18,0x19,0xFF,0xFF,0xFF,0xFF,0xFF  /* 'x', 'y', 'z', '{', '|', '}', '~', 'DEL' */
    4141};
    4242
  • trunk/libtransmission/peer-mgr.c

    r9544 r9548  
    153153typedef struct tr_torrent_peers
    154154{
    155     struct event               refillTimer;
    156 
    157155    tr_ptrArray                outgoingHandshakes; /* tr_handshake */
    158156    tr_ptrArray                pool; /* struct peer_atom */
     
    163161    tr_peer                  * optimistic; /* the optimistic peer, or NULL if none */
    164162    struct tr_peerMgr        * manager;
    165     //int                      * pendingRequestCount;
    166163
    167164    tr_bool                    isRunning;
     
    428425    assert( tr_ptrArrayEmpty( &t->peers ) );
    429426
    430     evtimer_del( &t->refillTimer );
    431 
    432427    tr_ptrArrayDestruct( &t->webseeds, (PtrArrayForeachFunc)tr_webseedFree );
    433428    tr_ptrArrayDestruct( &t->pool, (PtrArrayForeachFunc)tr_free );
     
    440435}
    441436
    442 
    443 //static void refillPulse( int, short, void* );
    444 
    445 static void peerCallbackFunc( void * vpeer,
    446                               void * vevent,
    447                               void * vt );
     437static void peerCallbackFunc( void * vpeer, void * vevent, void * vt );
    448438
    449439static Torrent*
     
    462452    t->outgoingHandshakes = TR_PTR_ARRAY_INIT;
    463453    t->requests = 0;
    464     //evtimer_set( &t->refillTimer, refillPulse, t );
    465 
    466454
    467455    for( i = 0; i < tor->info.webseedCount; ++i )
     
    617605        }
    618606
    619 //fprintf( stderr, "sorting requests by %s\n", (mode==REQ_SORTED_BY_BLOCK)?"block":"time" );
    620607        qsort( t->requests, t->requestCount,
    621608               sizeof( struct block_request ), compar );
     
    755742    if( t->piecesSort != mode )
    756743    {
    757 //fprintf( stderr, "sort mode was %d, is now %d\n", t->piecesSort, mode );
    758744        t->piecesSort = mode;
    759745
     
    764750        }
    765751
    766 //fprintf( stderr, "sorting pieces by %s...\n", (mode==PIECES_SORTED_BY_WEIGHT)?"weight":"index" );
    767752        weightTorrent = t->tor;
    768753        qsort( t->pieces, t->pieceCount,
     
    937922        pieceListRebuild( t );
    938923    pieceListSort( t, PIECES_SORTED_BY_WEIGHT );
    939 //if( t->isInEndgame ) fprintf( stderr, "endgame\n" );
    940 
    941 #if 0
    942 {
    943 int i=0, n=MIN(10,t->pieceCount);
    944 fprintf( stderr, "the next pieces we want to request are " );
    945 for( i=0; i<n; i++ ) fprintf( stderr, "%d(weight:%d) ", (int)t->pieces[i].index, (int)t->pieces[i].weight );
    946 fprintf( stderr, "\n" );
    947 }
    948 #endif
    949924
    950925    pieces = t->pieces;
     
    976951
    977952                setme[got++] = b;
    978 //fprintf( stderr, "peer %p is requesting block %"PRIu64"\n", peer, b );
    979953
    980954                /* update our own tables */
     
    1000974        /* rescore the pieces that we changed */
    1001975        weightTorrent = t->tor;
    1002 //fprintf( stderr, "sorting %d changed pieces...\n", (int)(a_end-a) );
    1003976        qsort( a, a_end-a, sizeof( struct weighted_piece ), comparePieceByWeight );
    1004977
     
    1025998    }
    1026999
    1027     //fprintf( stderr, "peer %p wanted %d requests; got %d\n", peer, numwant, got );
    10281000    *numgot = got;
    10291001}
     
    13281300            tr_torrent * tor = t->tor;
    13291301            tr_block_index_t block = _tr_block( tor, e->pieceIndex, e->offset );
    1330 //static int numBlocks = 0;
    1331 //fprintf( stderr, "got a total of %d blocks\n", ++numBlocks );
    13321302
    13331303            requestListRemove( t, block );
     
    13481318                    const tr_piece_index_t p = e->pieceIndex;
    13491319                    const tr_bool ok = tr_ioTestPiece( tor, p, NULL, 0 );
    1350 //fprintf( stderr, "we now have piece #%d\n", (int)p );
    13511320
    13521321                    if( !ok )
Note: See TracChangeset for help on using the changeset viewer.