2010-09-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Make finished() return true only when offset == totalLength.
	* src/AdaptiveFileAllocationIterator.cc
	* src/SingleFileAllocationIterator.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-09-10 11:46:43 +00:00
parent d687886c24
commit 6e7dd1650e
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2010-09-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Make finished() return true only when offset == totalLength.
* src/AdaptiveFileAllocationIterator.cc
* src/SingleFileAllocationIterator.cc
2010-09-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Moved connectedHostname, connectedAddr and connectedPort to

View File

@ -93,7 +93,7 @@ void AdaptiveFileAllocationIterator::allocateChunk()
bool AdaptiveFileAllocationIterator::finished()
{
if(allocator_.isNull()) {
return (uint64_t)offset_ >= totalLength_;
return (uint64_t)offset_ == totalLength_;
} else {
return allocator_->finished();
}

View File

@ -84,7 +84,7 @@ void SingleFileAllocationIterator::allocateChunk()
bool SingleFileAllocationIterator::finished()
{
return (uint64_t)offset_ >= totalLength_;
return (uint64_t)offset_ == totalLength_;
}
} // namespace aria2