Changeset 3486


Ignore:
Timestamp:
Oct 20, 2007, 10:07:21 PM (15 years ago)
Author:
charles
Message:

remove dead code (TR_STATUS_ACTIVE, TR_STATUS_INACTIVE)

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/transmissioncli.c

    r3484 r3486  
    314314                s->rateUpload, getStringRatio(s->ratio) );
    315315        }
    316         else if( s->status & TR_STATUS_INACTIVE )
     316        else if( s->status & TR_STATUS_STOPPED )
    317317        {
    318318            break;
  • trunk/daemon/torrents.c

    r3426 r3486  
    188188        const tr_stat  * st = tr_torrentStat( tor->tor );
    189189
    190         if( TR_STATUS_INACTIVE & st->status )
     190        if( !TR_STATUS_IS_ACTIVE( st->status ) )
    191191        {
    192192            tr_torrentStart( tor->tor );
     
    210210        const tr_stat  * st = tr_torrentStat( tor->tor );
    211211
    212         if( TR_STATUS_ACTIVE & st->status )
     212        if( TR_STATUS_IS_ACTIVE( st->status ) )
    213213        {
    214214            tr_torrentStop( tor->tor );
     
    840840                        inf->hashString, 2 * SHA_DIGEST_LENGTH, 1 );
    841841        tr_bencInitInt( tr_bencDictAdd( tor, "paused" ),
    842                         ( TR_STATUS_INACTIVE & st->status ? 1 : 0 ) );
     842                        !TR_STATUS_IS_ACTIVE( st->status ) );
    843843        tr_bencInitStr( tr_bencDictAdd( tor, "directory" ),
    844844                        tr_torrentGetFolder( ii->tor ), -1, 1 );
  • trunk/gtk/main.c

    r3449 r3486  
    194194    int status = 0;
    195195    gtk_tree_selection_selected_foreach( s, accumulateStatusForeach, &status );
    196     action_sensitize( "pause-torrent", (status & TR_STATUS_ACTIVE) != 0);
    197     action_sensitize( "start-torrent", (status & TR_STATUS_INACTIVE) != 0);
     196    action_sensitize( "pause-torrent", TR_STATUS_IS_ACTIVE(status) );
     197    action_sensitize( "start-torrent", !TR_STATUS_IS_ACTIVE(status) );
    198198    action_sensitize( "remove-torrent", status != 0);
    199199    action_sensitize( "verify-torrent", status != 0);
  • trunk/libtransmission/ipcparse.c

    r3484 r3486  
    859859                break;
    860860            case IPC_ST_RUNNING:
    861                 tr_bencInitInt( item,
    862                                 ( TR_STATUS_INACTIVE & st->status ? 0 : 1 ) );
     861                tr_bencInitInt( item, TR_STATUS_IS_ACTIVE(st->status) );
    863862                break;
    864863            case IPC_ST_STATE:
     
    879878                    tr_bencInitStr( item, "seeding", -1, 1 );
    880879                }
    881                 else if( TR_STATUS_INACTIVE & st->status )
     880                else if( TR_STATUS_STOPPED & st->status )
    882881                {
    883882                    tr_bencInitStr( item, "paused", -1, 1 );
  • trunk/libtransmission/transmission.h

    r3484 r3486  
    611611tr_torrent_status;
    612612
    613 #define TR_STATUS_ACTIVE \
    614     (TR_STATUS_CHECK_WAIT|TR_STATUS_CHECK|TR_STATUS_DOWNLOAD|TR_STATUS_DONE|TR_STATUS_SEED)
    615 #define TR_STATUS_INACTIVE \
    616     (TR_STATUS_STOPPED)
     613#define TR_STATUS_IS_ACTIVE(s) ((s) != TR_STATUS_STOPPED)
    617614
    618615/***********************************************************************
Note: See TracChangeset for help on using the changeset viewer.