mirror of
https://github.com/transmission/transmission
synced 2025-03-12 07:03:44 +00:00
round 2 of minor revisions to tr_stat
This commit is contained in:
parent
1e04e205a1
commit
d3077bbce1
3 changed files with 10 additions and 9 deletions
|
@ -814,14 +814,14 @@ tr_torrentStat( tr_torrent * tor )
|
|||
int i;
|
||||
tr_bitfield * available = tr_peerMgrGetAvailable( tor->handle->peerMgr,
|
||||
tor->info.hash );
|
||||
s->nonDndSize = 0;
|
||||
s->nonDndAvailable = 0;
|
||||
s->desiredSize = 0;
|
||||
s->desiredAvailable = 0;
|
||||
|
||||
for( i=0; i<tor->info.pieceCount; ++i ) {
|
||||
if( !tor->info.pieces[i].dnd ) {
|
||||
s->nonDndSize += tor->info.pieceSize;
|
||||
s->desiredSize += tor->info.pieceSize;
|
||||
if( tr_bitfieldHas( available, i ) )
|
||||
s->nonDndAvailable += tor->info.pieceSize;
|
||||
s->desiredAvailable += tor->info.pieceSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -620,7 +620,7 @@ onScrapeResponse( struct evhttp_request * req, void * vt )
|
|||
if(( tmp = tr_bencDictFind( flags, "min_request_interval")))
|
||||
t->scrapeIntervalMsec = tmp->val.i * 1000;
|
||||
|
||||
assert( tr_ptrArrayFindSorted(t->scraping,tor,torrentCompare) );
|
||||
assert( tr_ptrArrayFindSorted(t->scraping,tor,torrentCompare) ); /* FIXME This is the line that crashes for John_Clay */
|
||||
tr_ptrArrayRemoveSorted( t->scraping, tor, torrentCompare );
|
||||
|
||||
assert( !tor->scrapeTimer );
|
||||
|
|
|
@ -673,11 +673,12 @@ struct tr_stat
|
|||
uint64_t haveUnchecked;
|
||||
|
||||
/* Byte count of all the non-DND piece data that either we already have,
|
||||
* or that a peer we're connected to has. [0...tr_info.totalSize] */
|
||||
uint64_t nonDndAvailable;
|
||||
* or that a peer we're connected to has. [0...desiredSize] */
|
||||
uint64_t desiredAvailable;
|
||||
|
||||
/* Byte count of all the non-DND piece data */
|
||||
uint64_t nonDndSize;
|
||||
/* Byte count of all the piece data we want, whether we currently
|
||||
* have it nor not. [0...tr_info.totalSize] */
|
||||
uint64_t desiredSize;
|
||||
|
||||
float swarmspeed;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue