mirror of https://github.com/aria2/aria2
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
parent
da84d3cf83
commit
b1b20abe02
|
@ -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>
|
2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Fixed the bug that always first found Segment is removed from
|
Fixed the bug that always first found Segment is removed from
|
||||||
|
|
|
@ -73,10 +73,6 @@ void PeerMessageUtil::checkLength(int32_t length) {
|
||||||
if(length <= 0) {
|
if(length <= 0) {
|
||||||
throw new DlAbortEx("Invalid length: %d", length);
|
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) {
|
void PeerMessageUtil::checkRange(int32_t begin, int32_t length, int32_t pieceLength) {
|
||||||
|
|
Loading…
Reference in New Issue