Changeset 2079


Ignore:
Timestamp:
Jun 14, 2007, 6:12:39 PM (15 years ago)
Author:
charles
Message:

replace tr_getFinished() with something to the new states that DND causes. This re-breaks the mac build to annoy persept.

Location:
branches/file_selection
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/file_selection/cli/transmissioncli.c

    r2072 r2079  
    9292    tr_stat_t    * s;
    9393    tr_handle_status_t * hstat;
     94    cp_status_t cpPrevStatus = TR_CP_INCOMPLETE;
    9495
    9596    printf( "Transmission %s (%d) - http://transmission.m0k.org/\n\n",
     
    283284            fprintf( stderr, "\n" );
    284285        }
    285        
    286         if( tr_getFinished( tor ) )
    287         {
    288             result = system(finishCall);
     286       
     287        if( cpPrevStatus != s->cpStatus )
     288        {
     289            if( s->cpStatus == TR_CP_COMPLETE )
     290                result = system(finishCall);
     291
     292            cpPrevStatus = s->cpStatus;
    289293        }
    290294    }
  • branches/file_selection/libtransmission/internal.h

    r2005 r2079  
    176176    int               error;
    177177    char              errorString[128];
    178     int               finished;
    179178
    180179    char            * id;
  • branches/file_selection/libtransmission/torrent.c

    r2075 r2079  
    173173    tor->key      = h->key;
    174174    tor->azId     = h->azId;
    175     tor->finished = 0;
    176175
    177176    /* Escaped info hash for HTTP queries */
     
    376375
    377376    tr_lockUnlock( &tor->lock );
    378 }
    379 
    380 int tr_getFinished( tr_torrent_t * tor )
    381 {
    382     if( tor->finished )
    383     {
    384         tor->finished = 0;
    385         return 1;
    386     }
    387     return 0;
    388377}
    389378
     
    969958            }
    970959
    971             tor->finished = cpState != TR_CP_INCOMPLETE;
    972 
    973960            if( cpState == TR_CP_COMPLETE )
    974961                tr_trackerCompleted( tor->tracker );
  • branches/file_selection/libtransmission/transmission.h

    r2073 r2079  
    339339
    340340/***********************************************************************
    341  * tr_getFinished
    342  ***********************************************************************
    343  * The first call after a torrent is completed returns 1. Returns 0
    344  * in other cases.
    345  **********************************************************************/
    346 int tr_getFinished( tr_torrent_t * );
    347 
    348 /***********************************************************************
    349341 * tr_manualUpdate
    350342 ***********************************************************************
Note: See TracChangeset for help on using the changeset viewer.