瀏覽代碼

2008-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Fixed the bug that commands are created more than the number of	
pieces.
	* src/RequestGroup.cc
Tatsuhiro Tsujikawa 17 年之前
父節點
當前提交
58ad225655
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 5 0
      ChangeLog
  2. 1 1
      src/RequestGroup.cc

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-08-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Fixed the bug that commands are created more than the number of	pieces.
+	* src/RequestGroup.cc
+	
 2008-08-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Fixed infinite loop bug in FTP when SIZE command failed.

+ 1 - 1
src/RequestGroup.cc

@@ -491,9 +491,9 @@ void RequestGroup::createNextCommandWithAdj(std::deque<Command*>& commands,
     } else {
       numCommand = _numConcurrentCommand;
     }
-    numCommand += numAdj;
     numCommand = std::min(static_cast<int>(_downloadContext->getNumPieces()),
 			  numCommand);
+    numCommand += numAdj;
   }
   if(numCommand > 0) {
     createNextCommand(commands, e, numCommand);