2010-01-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed the bug that causes segmentaiton fault when aria2 sees '404
	not found' in the N times(N is where --max-file-not-found=N, N>0)
	in a row without single '200 OK' response.
	* src/RequestGroup.cc.
pull/1/head
Tatsuhiro Tsujikawa 2010-01-25 12:48:47 +00:00
parent b39ede01a7
commit 69850ada49
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2010-01-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that causes segmentaiton fault when aria2 sees '404
not found' in the N times(N is where --max-file-not-found=N, N>0)
in a row without single '200 OK' response.
* src/RequestGroup.cc.
2010-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error with i586-mingw32msvc-g++. Always Cut console

View File

@ -1026,7 +1026,8 @@ void RequestGroup::increaseAndValidateFileNotFoundCount()
++_fileNotFoundCount;
const unsigned int maxCount = _option->getAsInt(PREF_MAX_FILE_NOT_FOUND);
if(maxCount > 0 && _fileNotFoundCount >= maxCount &&
_segmentMan->calculateSessionDownloadLength() == 0) {
(_segmentMan.isNull() ||
_segmentMan->calculateSessionDownloadLength() == 0)) {
throw DOWNLOAD_FAILURE_EXCEPTION2
(StringFormat("Reached max-file-not-found count=%u", maxCount).str(),
downloadresultcode::MAX_FILE_NOT_FOUND);