mirror of https://github.com/aria2/aria2
				
				
				
			renamed TorrentMan::deltaDownload to TorrentMan::deltaDownloadLength
							parent
							
								
									f02143579b
								
							
						
					
					
						commit
						eb3103933b
					
				| 
						 | 
				
			
			@ -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();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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; }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue