Przeglądaj źródła

2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Removed a call to isPowerOf() because it is no longer necessary 
here
	and a request block is not always power of 2.
	BUG#1866924
	* src/PeerMessageUtil.cc (checkLength)
Tatsuhiro Tsujikawa 18 lat temu
rodzic
commit
b1b20abe02
2 zmienionych plików z 7 dodań i 4 usunięć
  1. 7 0
      ChangeLog
  2. 0 4
      src/PeerMessageUtil.cc

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2008-01-09  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Removed a call to isPowerOf() because it is no longer necessary here
+	and a request block is not always power of 2.
+	BUG#1866924
+	* src/PeerMessageUtil.cc (checkLength)
+
 2008-01-07  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Fixed the bug that always first found Segment is removed from

+ 0 - 4
src/PeerMessageUtil.cc

@@ -73,10 +73,6 @@ void PeerMessageUtil::checkLength(int32_t length) {
   if(length <= 0) {
     throw new DlAbortEx("Invalid length: %d", length);
   }
-  if(!Util::isPowerOf(length, 2)) {
-    throw new DlAbortEx("Invalid length: %d It is not power of 2",
-			length);
-  }
 }
 
 void PeerMessageUtil::checkRange(int32_t begin, int32_t length, int32_t pieceLength) {