Changeset 2079
- Timestamp:
- Jun 14, 2007, 6:12:39 PM (15 years ago)
- Location:
- branches/file_selection
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/file_selection/cli/transmissioncli.c
r2072 r2079 92 92 tr_stat_t * s; 93 93 tr_handle_status_t * hstat; 94 cp_status_t cpPrevStatus = TR_CP_INCOMPLETE; 94 95 95 96 printf( "Transmission %s (%d) - http://transmission.m0k.org/\n\n", … … 283 284 fprintf( stderr, "\n" ); 284 285 } 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; 289 293 } 290 294 } -
branches/file_selection/libtransmission/internal.h
r2005 r2079 176 176 int error; 177 177 char errorString[128]; 178 int finished;179 178 180 179 char * id; -
branches/file_selection/libtransmission/torrent.c
r2075 r2079 173 173 tor->key = h->key; 174 174 tor->azId = h->azId; 175 tor->finished = 0;176 175 177 176 /* Escaped info hash for HTTP queries */ … … 376 375 377 376 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;388 377 } 389 378 … … 969 958 } 970 959 971 tor->finished = cpState != TR_CP_INCOMPLETE;972 973 960 if( cpState == TR_CP_COMPLETE ) 974 961 tr_trackerCompleted( tor->tracker ); -
branches/file_selection/libtransmission/transmission.h
r2073 r2079 339 339 340 340 /*********************************************************************** 341 * tr_getFinished342 ***********************************************************************343 * The first call after a torrent is completed returns 1. Returns 0344 * in other cases.345 **********************************************************************/346 int tr_getFinished( tr_torrent_t * );347 348 /***********************************************************************349 341 * tr_manualUpdate 350 342 ***********************************************************************
Note: See TracChangeset
for help on using the changeset viewer.