mirror of https://github.com/aria2/aria2
2008-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed infinite loop bug in FTP when SIZE command failed. * src/FtpNegotiationCommand.ccpull/1/head
parent
a50048aa54
commit
01ae2bc912
|
@ -1,3 +1,8 @@
|
|||
2008-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Fixed infinite loop bug in FTP when SIZE command failed.
|
||||
* src/FtpNegotiationCommand.cc
|
||||
|
||||
2008-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Removed DirectDiskAdaptorTest.h
|
||||
|
|
|
@ -230,6 +230,7 @@ bool FtpNegotiationCommand::onFileSizeDetermined(uint64_t totalLength)
|
|||
_requestGroup->shouldCancelDownloadForSafety();
|
||||
_requestGroup->getPieceStorage()->getDiskAdaptor()->initAndOpenFile();
|
||||
|
||||
return true;
|
||||
} else {
|
||||
_requestGroup->initPieceStorage();
|
||||
|
||||
|
@ -286,7 +287,11 @@ bool FtpNegotiationCommand::recvSize() {
|
|||
// contacted FTP server doesn't support it.
|
||||
if(_requestGroup->getPieceStorage().isNull()) {
|
||||
|
||||
sequence = SEQ_FILE_PREPARATION;
|
||||
if(e->option->getAsBool(PREF_FTP_PASV)) {
|
||||
sequence = SEQ_SEND_PASV;
|
||||
} else {
|
||||
sequence = SEQ_SEND_PORT;
|
||||
}
|
||||
return onFileSizeDetermined(0);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue