Changeset 5597
- Timestamp:
- Apr 12, 2008, 3:56:21 PM (14 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/completion.c
r5498 r5597 303 303 } 304 304 305 uint64_t 306 tr_cpSizeWhenDone( const tr_completion * cp ) 307 { 308 tr_cpEnsureDoneValid( cp ); 309 310 return cp->doneTotal; 311 } 312 305 313 cp_status_t 306 314 tr_cpGetStatus ( const tr_completion * cp ) -
trunk/libtransmission/completion.h
r5329 r5597 41 41 uint64_t tr_cpLeftUntilComplete( const tr_completion * ); 42 42 uint64_t tr_cpLeftUntilDone( const tr_completion * ); 43 uint64_t tr_cpSizeWhenDone( const tr_completion * ); 43 44 float tr_cpPercentComplete( const tr_completion * ); 44 45 float tr_cpPercentDone( const tr_completion * ); -
trunk/libtransmission/torrent.c
r5587 r5597 614 614 s->percentDone = tr_cpPercentDone( tor->completion ); 615 615 s->leftUntilDone = tr_cpLeftUntilDone( tor->completion ); 616 s->sizeWhenDone = tr_cpSizeWhenDone( tor->completion ); 616 617 617 618 s->recheckProgress = … … 641 642 tr_bitfield * peerPieces = tr_peerMgrGetAvailable( tor->handle->peerMgr, 642 643 tor->info.hash ); 643 s->sizeWhenDone = 0;644 644 s->desiredAvailable = 0; 645 646 for( i=0; i<tor->info.pieceCount; ++i ) { 647 if( !tor->info.pieces[i].dnd ) { 648 s->sizeWhenDone += tor->info.pieceSize; 649 if( tr_bitfieldHas( peerPieces, i ) ) 650 s->desiredAvailable += tr_cpMissingBlocksInPiece( tor->completion, i ); 651 } 652 } 653 645 for( i=0; i<tor->info.pieceCount; ++i ) 646 if( !tor->info.pieces[i].dnd && tr_bitfieldHas( peerPieces, i ) ) 647 s->desiredAvailable += tr_cpMissingBlocksInPiece( tor->completion, i ); 654 648 s->desiredAvailable *= tor->blockSize; 655 649 tr_bitfieldFree( peerPieces ); -
trunk/libtransmission/transmission.h
r5588 r5597 877 877 time_t manualAnnounceTime; 878 878 879 /* Byte count of all the piece data we'll have downloaded when we're done. 880 * whether or not we have it yet. [0...tr_info.totalSize] */ 881 uint64_t sizeWhenDone; 882 879 883 /* Byte count of how much data is left to be downloaded until 880 * we're done -- that is, until we've got all the pieces we wanted. */ 884 * we're done -- that is, until we've got all the pieces we wanted. 885 * [0...tr_info.sizeWhenDone] */ 881 886 uint64_t leftUntilDone; 887 888 /* Byte count of all the piece data we want and don't have yet, 889 * but that a connected peer does have. [0...leftUntilDone] */ 890 uint64_t desiredAvailable; 882 891 883 892 /* Byte count of all the corrupt data you've ever downloaded for … … 901 910 * moved to `corrupt' or `haveValid'. */ 902 911 uint64_t haveUnchecked; 903 904 /* Byte count of all the piece data we'll have downloaded when we're done.905 * whether or not we have it yet. [0...tr_info.totalSize] */906 uint64_t sizeWhenDone;907 908 /* Byte count of all the piece data we want and don't have yet,909 * but that a connected peer does have. [0...sizeWhenDone] */910 uint64_t desiredAvailable;911 912 912 913 float swarmspeed;
Note: See TracChangeset
for help on using the changeset viewer.