Pārlūkot izejas kodu

renamed TorrentMan::deltaDownload to TorrentMan::deltaDownloadLength

Tatsuhiro Tsujikawa 19 gadi atpakaļ
vecāks
revīzija
eb3103933b

+ 1 - 1
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();

+ 3 - 3
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) {

+ 1 - 1
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),

+ 4 - 4
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; }