summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/PeerInteractionCommand.cc2
-rw-r--r--src/TorrentConsoleDownloadEngine.cc6
-rw-r--r--src/TorrentMan.cc2
-rw-r--r--src/TorrentMan.h10
4 files changed, 10 insertions, 10 deletions
diff --git a/src/PeerInteractionCommand.cc b/src/PeerInteractionCommand.cc
index 0a9f2598..e04d93d4 100644
--- a/src/PeerInteractionCommand.cc
+++ b/src/PeerInteractionCommand.cc
@@ -256,7 +256,7 @@ void PeerInteractionCommand::receiveMessage() {
peerConnection);
sendMessageQueue->addPendingMessage(pendingMessage);
e->torrentMan->addUploadLength(message->getLength());
- e->torrentMan->addDeltaUpload(message->getLength());
+ e->torrentMan->addDeltaUploadLength(message->getLength());
}
break;
case PeerMessage::CANCEL:
diff --git a/src/TorrentConsoleDownloadEngine.cc b/src/TorrentConsoleDownloadEngine.cc
index f25679b3..52505618 100644
--- a/src/TorrentConsoleDownloadEngine.cc
+++ b/src/TorrentConsoleDownloadEngine.cc
@@ -70,15 +70,15 @@ void TorrentConsoleDownloadEngine::calculateStatistics() {
long long int elapsed = Util::difftv(now, cp[currentCp]);
sessionDownloadSize[0] += torrentMan->getDeltaDownloadLength();
- sessionUploadSize[0] += torrentMan->getDeltaUpload();
+ sessionUploadSize[0] += torrentMan->getDeltaUploadLength();
sessionDownloadSize[1] += torrentMan->getDeltaDownloadLength();
- sessionUploadSize[1] += torrentMan->getDeltaUpload();
+ sessionUploadSize[1] += torrentMan->getDeltaUploadLength();
downloadSpeed = calculateSpeed(sessionDownloadSize[currentCp], elapsed);
uploadSpeed = calculateSpeed(sessionUploadSize[currentCp], elapsed);
torrentMan->resetDeltaDownloadLength();
- torrentMan->resetDeltaUpload();
+ torrentMan->resetDeltaUploadLength();
if(elapsed-lastElapsed >= 1000000) {
printStatistics();
diff --git a/src/TorrentMan.cc b/src/TorrentMan.cc
index 5b8dcd62..d8d2f030 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),
- deltaDownloadLength(0), deltaUpload(0),
+ deltaDownloadLength(0), deltaUploadLength(0),
storeDir("."),
multiFileTopDir(NULL),
setupComplete(false),
diff --git a/src/TorrentMan.h b/src/TorrentMan.h
index d5125e95..cccf64a4 100644
--- a/src/TorrentMan.h
+++ b/src/TorrentMan.h
@@ -79,7 +79,7 @@ private:
long long int preDownloadLength;
long long int preUploadLength;
int deltaDownloadLength;
- int deltaUpload;
+ int deltaUploadLength;
int fileMode;
string storeDir;
int port;
@@ -176,13 +176,13 @@ public:
long long int getTotalLength() const { return totalLength; }
void setTotalLength(long long int length) { totalLength = length; }
- void addDeltaDownloadLength(int size) { deltaDownloadLength += size; }
+ void addDeltaDownloadLength(int length) { deltaDownloadLength += length; }
int getDeltaDownloadLength() const { return deltaDownloadLength; }
void resetDeltaDownloadLength() { deltaDownloadLength = 0; }
- void addDeltaUpload(int size) { deltaUpload += size; }
- int getDeltaUpload() const { return deltaUpload; }
- void resetDeltaUpload() { deltaUpload = 0; }
+ void addDeltaUploadLength(int length) { deltaUploadLength += length; }
+ int getDeltaUploadLength() const { return deltaUploadLength; }
+ void resetDeltaUploadLength() { deltaUploadLength = 0; }
void addDownloadLength(int deltaLength) { downloadLength += deltaLength; }
long long int getDownloadLength() const { return downloadLength; }