renamed TorrentMan::deltaDownload to TorrentMan::deltaDownloadLength

pull/1/head
Tatsuhiro Tsujikawa 2006-03-31 15:30:37 +00:00
parent f02143579b
commit eb3103933b
4 changed files with 9 additions and 9 deletions

View File

@ -278,7 +278,7 @@ void PeerInteractionCommand::receiveMessage() {
e->torrentMan->updatePiece(piece); e->torrentMan->updatePiece(piece);
e->logger->debug("CUID#%d - setting piece bit index=%d", cuid, e->logger->debug("CUID#%d - setting piece bit index=%d", cuid,
slot.getBlockIndex()); slot.getBlockIndex());
e->torrentMan->addDeltaDownload(message->getBlockLength()); e->torrentMan->addDeltaDownloadLength(message->getBlockLength());
if(piece.pieceComplete()) { if(piece.pieceComplete()) {
if(checkPieceHash(piece)) { if(checkPieceHash(piece)) {
onGotNewPiece(); onGotNewPiece();

View File

@ -69,15 +69,15 @@ void TorrentConsoleDownloadEngine::calculateStatistics() {
gettimeofday(&now, NULL); gettimeofday(&now, NULL);
long long int elapsed = Util::difftv(now, cp[currentCp]); long long int elapsed = Util::difftv(now, cp[currentCp]);
sessionDownloadSize[0] += torrentMan->getDeltaDownload(); sessionDownloadSize[0] += torrentMan->getDeltaDownloadLength();
sessionUploadSize[0] += torrentMan->getDeltaUpload(); sessionUploadSize[0] += torrentMan->getDeltaUpload();
sessionDownloadSize[1] += torrentMan->getDeltaDownload(); sessionDownloadSize[1] += torrentMan->getDeltaDownloadLength();
sessionUploadSize[1] += torrentMan->getDeltaUpload(); sessionUploadSize[1] += torrentMan->getDeltaUpload();
downloadSpeed = calculateSpeed(sessionDownloadSize[currentCp], elapsed); downloadSpeed = calculateSpeed(sessionDownloadSize[currentCp], elapsed);
uploadSpeed = calculateSpeed(sessionUploadSize[currentCp], elapsed); uploadSpeed = calculateSpeed(sessionUploadSize[currentCp], elapsed);
torrentMan->resetDeltaDownload(); torrentMan->resetDeltaDownloadLength();
torrentMan->resetDeltaUpload(); torrentMan->resetDeltaUpload();
if(elapsed-lastElapsed >= 1000000) { if(elapsed-lastElapsed >= 1000000) {

View File

@ -37,7 +37,7 @@ TorrentMan::TorrentMan():bitfield(NULL),
peerEntryIdCounter(0), cuidCounter(0), peerEntryIdCounter(0), cuidCounter(0),
downloadLength(0), uploadLength(0), downloadLength(0), uploadLength(0),
preDownloadLength(0), preUploadLength(0), preDownloadLength(0), preUploadLength(0),
deltaDownload(0), deltaUpload(0), deltaDownloadLength(0), deltaUpload(0),
storeDir("."), storeDir("."),
multiFileTopDir(NULL), multiFileTopDir(NULL),
setupComplete(false), setupComplete(false),

View File

@ -78,7 +78,7 @@ private:
long long int uploadLength; long long int uploadLength;
long long int preDownloadLength; long long int preDownloadLength;
long long int preUploadLength; long long int preUploadLength;
int deltaDownload; int deltaDownloadLength;
int deltaUpload; int deltaUpload;
int fileMode; int fileMode;
string storeDir; string storeDir;
@ -176,9 +176,9 @@ public:
long long int getTotalLength() const { return totalLength; } long long int getTotalLength() const { return totalLength; }
void setTotalLength(long long int length) { totalLength = length; } void setTotalLength(long long int length) { totalLength = length; }
void addDeltaDownload(int size) { deltaDownload += size; } void addDeltaDownloadLength(int size) { deltaDownloadLength += size; }
int getDeltaDownload() const { return deltaDownload; } int getDeltaDownloadLength() const { return deltaDownloadLength; }
void resetDeltaDownload() { deltaDownload = 0; } void resetDeltaDownloadLength() { deltaDownloadLength = 0; }
void addDeltaUpload(int size) { deltaUpload += size; } void addDeltaUpload(int size) { deltaUpload += size; }
int getDeltaUpload() const { return deltaUpload; } int getDeltaUpload() const { return deltaUpload; }