mirror of https://github.com/aria2/aria2
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Commented out throw statements when number of piece is 0 to download 0 length torrent. * src/bittorrent_helper.ccpull/1/head
parent
24d258cf66
commit
cafd23a068
|
@ -1,3 +1,9 @@
|
||||||
|
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Commented out throw statements when number of piece is 0 to
|
||||||
|
download 0 length torrent.
|
||||||
|
* src/bittorrent_helper.cc
|
||||||
|
|
||||||
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Call RequestGroup::createNextCommandWithAdj() from
|
Call RequestGroup::createNextCommandWithAdj() from
|
||||||
|
|
|
@ -345,13 +345,15 @@ static void processRootDictionary
|
||||||
throw DL_ABORT_EX(StringFormat(MSG_MISSING_BT_INFO,
|
throw DL_ABORT_EX(StringFormat(MSG_MISSING_BT_INFO,
|
||||||
C_PIECES.c_str()).str());
|
C_PIECES.c_str()).str());
|
||||||
}
|
}
|
||||||
if(piecesData.s().empty()) {
|
// Commented out To download 0 length torrent.
|
||||||
throw DL_ABORT_EX("The length of piece hash is 0.");
|
// if(piecesData.s().empty()) {
|
||||||
}
|
// throw DL_ABORT_EX("The length of piece hash is 0.");
|
||||||
|
// }
|
||||||
size_t numPieces = piecesData.s().size()/PIECE_HASH_LENGTH;
|
size_t numPieces = piecesData.s().size()/PIECE_HASH_LENGTH;
|
||||||
if(numPieces == 0) {
|
// Commented out to download 0 length torrent.
|
||||||
throw DL_ABORT_EX("The number of pieces is 0.");
|
// if(numPieces == 0) {
|
||||||
}
|
// throw DL_ABORT_EX("The number of pieces is 0.");
|
||||||
|
// }
|
||||||
// retrieve piece length
|
// retrieve piece length
|
||||||
const BDE& pieceLengthData = infoDict[C_PIECE_LENGTH];
|
const BDE& pieceLengthData = infoDict[C_PIECE_LENGTH];
|
||||||
if(!pieceLengthData.isInteger()) {
|
if(!pieceLengthData.isInteger()) {
|
||||||
|
|
Loading…
Reference in New Issue