mirror of https://github.com/aria2/aria2
2010-05-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Code cleanup. * src/RequestGroupMan.cc * src/UTMetadataPostDownloadHandler.cc * src/XmlRpcMethodImpl.ccpull/1/head
parent
83465ff83d
commit
2284c0a837
|
@ -1,3 +1,10 @@
|
|||
2010-05-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Code cleanup.
|
||||
* src/RequestGroupMan.cc
|
||||
* src/UTMetadataPostDownloadHandler.cc
|
||||
* src/XmlRpcMethodImpl.cc
|
||||
|
||||
2010-05-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Store both whole checksum and piece hash in metalink file.
|
||||
|
|
|
@ -349,7 +349,7 @@ public:
|
|||
void operator()(const SharedHandle<RequestGroup>& group)
|
||||
{
|
||||
if(group->getNumCommand() == 0) {
|
||||
SharedHandle<DownloadContext> dctx = group->getDownloadContext();
|
||||
const SharedHandle<DownloadContext>& dctx = group->getDownloadContext();
|
||||
// DownloadContext::resetDownloadStopTime() is only called when
|
||||
// download completed. If
|
||||
// DownloadContext::getDownloadStopTime().isZero() is true, then
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace aria2 {
|
|||
bool UTMetadataPostDownloadHandler::Criteria::match
|
||||
(const RequestGroup* requestGroup) const
|
||||
{
|
||||
SharedHandle<DownloadContext> dctx =
|
||||
const SharedHandle<DownloadContext>& dctx =
|
||||
requestGroup->getDownloadContext();
|
||||
if(dctx->hasAttribute(bittorrent::BITTORRENT)) {
|
||||
const BDE& attrs = dctx->getAttribute(bittorrent::BITTORRENT);
|
||||
|
@ -76,7 +76,7 @@ UTMetadataPostDownloadHandler::UTMetadataPostDownloadHandler():
|
|||
void UTMetadataPostDownloadHandler::getNextRequestGroups
|
||||
(std::vector<SharedHandle<RequestGroup> >& groups, RequestGroup* requestGroup)
|
||||
{
|
||||
SharedHandle<DownloadContext> dctx = requestGroup->getDownloadContext();
|
||||
const SharedHandle<DownloadContext>& dctx =requestGroup->getDownloadContext();
|
||||
const BDE& attrs = dctx->getAttribute(bittorrent::BITTORRENT);
|
||||
std::string metadata =
|
||||
util::toString(requestGroup->getPieceStorage()->getDiskAdaptor());
|
||||
|
|
|
@ -1044,7 +1044,7 @@ BDE GetServersXmlRpcMethod::process
|
|||
throw DL_ABORT_EX(StringFormat("No active download for GID#%s",
|
||||
util::itos(gid).c_str()).str());
|
||||
}
|
||||
SharedHandle<DownloadContext> dctx = group->getDownloadContext();
|
||||
const SharedHandle<DownloadContext>& dctx = group->getDownloadContext();
|
||||
const std::vector<SharedHandle<FileEntry> >& files = dctx->getFileEntries();
|
||||
BDE result = BDE::list();
|
||||
size_t index = 1;
|
||||
|
@ -1099,7 +1099,7 @@ BDE ChangeUriXmlRpcMethod::process
|
|||
(StringFormat("Cannot remove URIs from GID#%s",
|
||||
util::itos(gid).c_str()).str());
|
||||
}
|
||||
SharedHandle<DownloadContext> dctx = group->getDownloadContext();
|
||||
const SharedHandle<DownloadContext>& dctx = group->getDownloadContext();
|
||||
const std::vector<SharedHandle<FileEntry> >& files = dctx->getFileEntries();
|
||||
if(files.size() <= index) {
|
||||
throw DL_ABORT_EX(StringFormat("fileIndex is out of range").str());
|
||||
|
|
Loading…
Reference in New Issue