Changeset 13360
- Timestamp:
- Jul 1, 2012, 2:00:02 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-mgr.c
r13329 r13360 2495 2495 2496 2496 if( tr_torrentHasMetadata( tor ) ) 2497 { 2497 2498 peer->progress = true_count / tor->info.pieceCount; 2499 } 2498 2500 else /* without pieceCount, this result is only a best guess... */ 2501 { 2499 2502 peer->progress = true_count / ( have->bit_count + 1 ); 2500 } 2503 } 2504 } 2505 2506 /* clamp the progress range */ 2507 if ( peer->progress < 0.0 ) 2508 peer->progress = 0.0; 2509 if ( peer->progress > 1.0 ) 2510 peer->progress = 1.0; 2501 2511 2502 2512 if( peer->atom && ( peer->progress >= 1.0 ) )
Note: See TracChangeset
for help on using the changeset viewer.