mirror of https://github.com/aria2/aria2
2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that causes infinite loop when the number of pieces are fewer than allowed fast set size which is 10 by default. * src/DefaultBtContext.ccpull/1/head
parent
10f730cfec
commit
8929168380
|
@ -1,3 +1,9 @@
|
|||
2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Fixed the bug that causes infinite loop when the number of pieces are
|
||||
fewer than allowed fast set size which is 10 by default.
|
||||
* src/DefaultBtContext.cc
|
||||
|
||||
2008-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Updated the descriptions for -j, -s. Added --bt-seed.
|
||||
|
|
|
@ -422,6 +422,9 @@ void DefaultBtContext::computeFastSet
|
|||
if(!PeerMessageUtil::createcompact(compact, ipaddr, 0)) {
|
||||
return;
|
||||
}
|
||||
if(numPieces < fastSetSize) {
|
||||
fastSetSize = numPieces;
|
||||
}
|
||||
unsigned char tx[24];
|
||||
memcpy(tx, compact, 4);
|
||||
if((tx[0] & 0x80) == 0 || (tx[0] & 0x40) == 0) {
|
||||
|
|
Loading…
Reference in New Issue