mirror of https://github.com/aria2/aria2
2009-12-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that connection is always dropped if handshake message in extension protocol don't have metadata_size. src/HandshakeExtensionMessage.cc * src/HandshakeExtensionMessage.ccpull/1/head
parent
1016f51f7a
commit
c44cf31df7
|
@ -1,3 +1,10 @@
|
|||
2009-12-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed the bug that connection is always dropped if handshake
|
||||
message in extension protocol don't have metadata_size.
|
||||
src/HandshakeExtensionMessage.cc
|
||||
* src/HandshakeExtensionMessage.cc
|
||||
|
||||
2009-12-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Updated "URI, MAGNET, TORRENT_FILE, METALINK_FILE" section. Added
|
||||
|
|
|
@ -113,7 +113,7 @@ void HandshakeExtensionMessage::doReceivedAction()
|
|||
BDE& attrs = _dctx->getAttribute(bittorrent::BITTORRENT);
|
||||
if(!attrs.containsKey(bittorrent::METADATA) &&
|
||||
!_peer->getExtensionMessageID("ut_metadata")) {
|
||||
// TODO In metadataGetMode, if peer dont' support metadata
|
||||
// TODO In metadataGetMode, if peer don't support metadata
|
||||
// transfer, should we drop connection? There is a possibility
|
||||
// that peer can still tell us peers using PEX.
|
||||
throw DL_ABORT_EX("Peer doesn't support ut_metadata extension. Goodbye.");
|
||||
|
@ -133,7 +133,7 @@ void HandshakeExtensionMessage::doReceivedAction()
|
|||
_dctx->getOwnerRequestGroup()->getPieceStorage();
|
||||
pieceStorage->setEndGamePieceNum(0);
|
||||
}
|
||||
} else {
|
||||
} else if(!attrs.containsKey(bittorrent::METADATA)) {
|
||||
throw DL_ABORT_EX("Peer didn't provide metadata_size."
|
||||
" It seems that it doesn't have whole metadata.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue