Changeset 2082
- Timestamp:
- Jun 15, 2007, 12:15:39 AM (15 years ago)
- Location:
- branches/file_selection
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/file_selection/cli/transmissioncli.c
r2079 r2082 92 92 tr_stat_t * s; 93 93 tr_handle_status_t * hstat; 94 cp_status_t cpPrevStatus = TR_CP_INCOMPLETE;95 94 96 95 printf( "Transmission %s (%d) - http://transmission.m0k.org/\n\n", … … 284 283 fprintf( stderr, "\n" ); 285 284 } 286 287 if( cpPrevStatus != s->cpStatus ) 288 { 289 if( s->cpStatus == TR_CP_COMPLETE ) 290 result = system(finishCall); 291 292 cpPrevStatus = s->cpStatus; 285 286 if( tr_getFinished( tor ) ) 287 { 288 result = system(finishCall); 293 289 } 294 290 } -
branches/file_selection/libtransmission/internal.h
r2079 r2082 176 176 int error; 177 177 char errorString[128]; 178 int finished; 178 179 179 180 char * id; -
branches/file_selection/libtransmission/torrent.c
r2079 r2082 173 173 tor->key = h->key; 174 174 tor->azId = h->azId; 175 tor->finished = 0; 175 176 176 177 /* Escaped info hash for HTTP queries */ … … 375 376 376 377 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; 377 388 } 378 389 … … 958 969 } 959 970 971 tor->finished = cpState != TR_CP_INCOMPLETE; 972 960 973 if( cpState == TR_CP_COMPLETE ) 961 974 tr_trackerCompleted( tor->tracker ); -
branches/file_selection/libtransmission/transmission.h
r2079 r2082 339 339 340 340 /*********************************************************************** 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 349 /*********************************************************************** 341 350 * tr_manualUpdate 342 351 ***********************************************************************
Note: See TracChangeset
for help on using the changeset viewer.