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)
pull/1/head
Tatsuhiro Tsujikawa 2008-01-09 12:34:48 +00:00
parent da84d3cf83
commit b1b20abe02
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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) {