diff --git a/src/DownloadEngine.cc b/src/DownloadEngine.cc index ec23ce2a..c03ca622 100644 --- a/src/DownloadEngine.cc +++ b/src/DownloadEngine.cc @@ -208,7 +208,7 @@ void DownloadEngine::calculateStatistics() void DownloadEngine::onEndOfRun() { - requestGroupMan_->updateServerStat(); + requestGroupMan_->removeStoppedGroup(this); requestGroupMan_->closeFile(); requestGroupMan_->save(); } diff --git a/src/RequestGroupMan.cc b/src/RequestGroupMan.cc index b3ef0578..3e88e2e4 100644 --- a/src/RequestGroupMan.cc +++ b/src/RequestGroupMan.cc @@ -634,25 +634,6 @@ void RequestGroupMan::showDownloadResults(std::ostream& o) const } o << formatDownloadResult(status, *itr) << "\n"; } - for(std::deque >::const_iterator itr = - requestGroups_.begin(), eoi = requestGroups_.end(); itr != eoi; ++itr) { - DownloadResultHandle result = (*itr)->createDownloadResult(); - std::string status; - if(result->result == error_code::FINISHED) { - status = MARK_OK; - ++ok; - } else { - // Since this RequestGroup is not processed by ProcessStoppedRequestGroup, - // its download stop time is not reseted. - // Reset download stop time and assign sessionTime here. - (*itr)->getDownloadContext()->resetDownloadStopTime(); - result->sessionTime = - (*itr)->getDownloadContext()->calculateSessionTime(); - status = MARK_INPR; - ++inpr; - } - o << formatDownloadResult(status, result) << "\n"; - } for(std::deque >::const_iterator itr = reservedGroups_.begin(), eoi = reservedGroups_.end(); itr != eoi; ++itr) { diff --git a/src/SessionSerializer.cc b/src/SessionSerializer.cc index 9001dbe6..886f610d 100644 --- a/src/SessionSerializer.cc +++ b/src/SessionSerializer.cc @@ -184,18 +184,6 @@ void SessionSerializer::save(std::ostream& out) const } } } - if(saveInProgress_) { - const std::deque >& groups = - rgman_->getRequestGroups(); - for(std::deque >::const_iterator itr = - groups.begin(), eoi = groups.end(); itr != eoi; ++itr) { - SharedHandle result = (*itr)->createDownloadResult(); - if(result->result == error_code::FINISHED) { - continue; - } - writeDownloadResult(out, metainfoCache, result); - } - } if(saveWaiting_) { const std::deque >& groups = rgman_->getReservedGroups();