From 8d2ca8e03cb13e0016c59ce4db4ed64a6bdd8d46 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 10 Jul 2010 07:34:20 +0000 Subject: 2010-07-10 Tatsuhiro Tsujikawa Fixed the bug that DownloadContext::resetDownloadStartTime() never be called in downloads whose total length is unknown. This causes avg speed in Download Results is always 0 for these downloads. * src/RequestGroup.cc * src/BtFileAllocationEntry.cc * src/StreamFileAllocationEntry.cc --- src/BtFileAllocationEntry.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/BtFileAllocationEntry.cc') diff --git a/src/BtFileAllocationEntry.cc b/src/BtFileAllocationEntry.cc index 834a318e..3dc5d722 100644 --- a/src/BtFileAllocationEntry.cc +++ b/src/BtFileAllocationEntry.cc @@ -58,6 +58,8 @@ void BtFileAllocationEntry::prepareForNextAction BtSetup().setup(commands, getRequestGroup(), e, getRequestGroup()->getOption().get()); if(!getRequestGroup()->downloadFinished()) { + // For DownloadContext::resetDownloadStartTime(), see also + // RequestGroup::createInitialCommand() getRequestGroup()->getDownloadContext()->resetDownloadStartTime(); const std::vector >& fileEntries = getRequestGroup()->getDownloadContext()->getFileEntries(); -- cgit