diff --git a/src/PeerInteractionCommand.cc b/src/PeerInteractionCommand.cc index 0ca1f6ed..0a9f2598 100644 --- a/src/PeerInteractionCommand.cc +++ b/src/PeerInteractionCommand.cc @@ -278,7 +278,7 @@ void PeerInteractionCommand::receiveMessage() { e->torrentMan->updatePiece(piece); e->logger->debug("CUID#%d - setting piece bit index=%d", cuid, slot.getBlockIndex()); - e->torrentMan->addDeltaDownload(message->getBlockLength()); + e->torrentMan->addDeltaDownloadLength(message->getBlockLength()); if(piece.pieceComplete()) { if(checkPieceHash(piece)) { onGotNewPiece(); diff --git a/src/TorrentConsoleDownloadEngine.cc b/src/TorrentConsoleDownloadEngine.cc index e459549b..f25679b3 100644 --- a/src/TorrentConsoleDownloadEngine.cc +++ b/src/TorrentConsoleDownloadEngine.cc @@ -69,15 +69,15 @@ void TorrentConsoleDownloadEngine::calculateStatistics() { gettimeofday(&now, NULL); long long int elapsed = Util::difftv(now, cp[currentCp]); - sessionDownloadSize[0] += torrentMan->getDeltaDownload(); + sessionDownloadSize[0] += torrentMan->getDeltaDownloadLength(); sessionUploadSize[0] += torrentMan->getDeltaUpload(); - sessionDownloadSize[1] += torrentMan->getDeltaDownload(); + sessionDownloadSize[1] += torrentMan->getDeltaDownloadLength(); sessionUploadSize[1] += torrentMan->getDeltaUpload(); downloadSpeed = calculateSpeed(sessionDownloadSize[currentCp], elapsed); uploadSpeed = calculateSpeed(sessionUploadSize[currentCp], elapsed); - torrentMan->resetDeltaDownload(); + torrentMan->resetDeltaDownloadLength(); torrentMan->resetDeltaUpload(); if(elapsed-lastElapsed >= 1000000) { diff --git a/src/TorrentMan.cc b/src/TorrentMan.cc index 7a3ea911..5b8dcd62 100644 --- a/src/TorrentMan.cc +++ b/src/TorrentMan.cc @@ -37,7 +37,7 @@ TorrentMan::TorrentMan():bitfield(NULL), peerEntryIdCounter(0), cuidCounter(0), downloadLength(0), uploadLength(0), preDownloadLength(0), preUploadLength(0), - deltaDownload(0), deltaUpload(0), + deltaDownloadLength(0), deltaUpload(0), storeDir("."), multiFileTopDir(NULL), setupComplete(false), diff --git a/src/TorrentMan.h b/src/TorrentMan.h index 84798a50..d5125e95 100644 --- a/src/TorrentMan.h +++ b/src/TorrentMan.h @@ -78,7 +78,7 @@ private: long long int uploadLength; long long int preDownloadLength; long long int preUploadLength; - int deltaDownload; + int deltaDownloadLength; int deltaUpload; int fileMode; string storeDir; @@ -176,9 +176,9 @@ public: long long int getTotalLength() const { return totalLength; } void setTotalLength(long long int length) { totalLength = length; } - void addDeltaDownload(int size) { deltaDownload += size; } - int getDeltaDownload() const { return deltaDownload; } - void resetDeltaDownload() { deltaDownload = 0; } + void addDeltaDownloadLength(int size) { deltaDownloadLength += size; } + int getDeltaDownloadLength() const { return deltaDownloadLength; } + void resetDeltaDownloadLength() { deltaDownloadLength = 0; } void addDeltaUpload(int size) { deltaUpload += size; } int getDeltaUpload() const { return deltaUpload; }