add a couple of more ways to short-circuit the tr_stat.desiredAvailable test in tr_torrentStat(), as suggested by BentMyWookie

This commit is contained in:
Charles Kerr 2008-05-30 16:49:03 +00:00
parent 5ed97a1c04
commit f3db37ab1b
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@ tr_torrentStat( tr_torrent * tor )
s->haveUnchecked = tr_cpHaveTotal( tor->completion ) - s->haveValid; s->haveUnchecked = tr_cpHaveTotal( tor->completion ) - s->haveValid;
if( !s->leftUntilDone ) if( !s->leftUntilDone || !tor->isRunning || !s->peersConnected )
s->desiredAvailable = 0; s->desiredAvailable = 0;
else { else {
tr_piece_index_t i; tr_piece_index_t i;