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

Fixed the bug that AdaptiveFileAllocationIterator::finished()
	returns false even if offset_ >= totalLength_. This causes
	ftruncate error for seeding torrents.
	* src/AdaptiveFileAllocationIterator.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-07-09 13:45:43 +00:00
parent f285f66ac8
commit 53c4de7ffd
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that AdaptiveFileAllocationIterator::finished()
returns false even if offset_ >= totalLength_. This causes
ftruncate error for seeding torrents.
* src/AdaptiveFileAllocationIterator.cc
2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Send each CWD component of FTP URI in separate CWD command as

View File

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