summaryrefslogtreecommitdiff
path: root/src/BtFileAllocationEntry.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-07-04 15:26:00 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-07-04 15:26:00 +0000
commit24d258cf66a18ebff73dfc2baea10fc85b7e3fbf (patch)
tree5b01b8171c6246d747b9687562fb4cbdd70b4676 /src/BtFileAllocationEntry.cc
parentf8fd518229f7c63291ab2fa8b6cb7caa3958ad60 (diff)
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Call RequestGroup::createNextCommandWithAdj() from BtFileAllocationEntry if at least one FileEntry has URI. The static function hasAssociatedUri in RequestGroup.cc is renamed as isUriSuppliedForRequsetFileEntry() and placed in FileEntry.h. * src/BtFileAllocationEntry.cc * src/FileEntry.h * src/RequestGroup.cc
Diffstat (limited to 'src/BtFileAllocationEntry.cc')
-rw-r--r--src/BtFileAllocationEntry.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/BtFileAllocationEntry.cc b/src/BtFileAllocationEntry.cc
index 861a634e..e730e92b 100644
--- a/src/BtFileAllocationEntry.cc
+++ b/src/BtFileAllocationEntry.cc
@@ -55,7 +55,11 @@ void BtFileAllocationEntry::prepareForNextAction(std::deque<Command*>& commands,
BtSetup().setup(commands, _requestGroup, e, _requestGroup->getOption().get());
if(!_requestGroup->downloadFinished()) {
_requestGroup->getDownloadContext()->resetDownloadStartTime();
- _requestGroup->createNextCommandWithAdj(commands, e, 0);
+ const std::vector<SharedHandle<FileEntry> >& fileEntries =
+ _requestGroup->getDownloadContext()->getFileEntries();
+ if(isUriSuppliedForRequsetFileEntry(fileEntries.begin(), fileEntries.end())) {
+ _requestGroup->createNextCommandWithAdj(commands, e, 0);
+ }
}
}