Changeset 788
- Timestamp:
- Aug 16, 2006, 7:21:09 PM (16 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/internal.h
r679 r788 128 128 tr_ratecontrol_t * upload; 129 129 tr_ratecontrol_t * download; 130 tr_ratecontrol_t * swarmspeed; 130 131 tr_fd_t * fdlimit; 131 132 -
trunk/libtransmission/peerparse.h
r261 r788 109 109 tr_bitfieldAdd( peer->bitfield, piece ); 110 110 updateInterest( tor, peer ); 111 112 tr_rcTransferred( tor->swarmspeed, tor->info.pieceSize ); 111 113 112 114 return 0; -
trunk/libtransmission/transmission.c
r780 r788 283 283 tor->upload = tr_rcInit(); 284 284 tor->download = tr_rcInit(); 285 tor->swarmspeed = tr_rcInit(); 285 286 286 287 /* We have a new torrent */ … … 350 351 tr_rcReset( tor->download ); 351 352 tr_rcReset( tor->upload ); 353 tr_rcReset( tor->swarmspeed ); 352 354 tor->status = TR_STATUS_STOPPING; 353 355 tor->stopDate = tr_date(); … … 455 457 s->progress = tr_cpCompletionAsFloat( tor->completion ); 456 458 if( tor->status & TR_STATUS_DOWNLOAD ) 459 { 457 460 s->rateDownload = tr_rcRate( tor->download ); 461 } 458 462 else 463 { 459 464 /* tr_rcRate() doesn't make the difference between 'piece' 460 465 messages and other messages, which causes a non-zero … … 462 467 force it to zero not to confuse the user. */ 463 468 s->rateDownload = 0.0; 469 } 464 470 s->rateUpload = tr_rcRate( tor->upload ); 465 471 466 472 s->seeders = tr_trackerSeeders(tor->tracker); 467 s->leechers = tr_trackerLeechers(tor->tracker); 473 s->leechers = tr_trackerLeechers(tor->tracker); 474 475 s->swarmspeed = tr_rcRate( tor->swarmspeed ); 468 476 469 477 if( s->rateDownload < 0.1 ) … … 589 597 tr_rcClose( tor->upload ); 590 598 tr_rcClose( tor->download ); 599 tr_rcClose( tor->swarmspeed ); 591 600 592 601 if( tor->destination ) -
trunk/libtransmission/transmission.h
r780 r788 322 322 uint64_t downloaded; 323 323 uint64_t uploaded; 324 float swarmspeed; 324 325 }; 325 326
Note: See TracChangeset
for help on using the changeset viewer.