From cfe373cbbf6586af24e435bcb5dafa55c1a01676 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 21 Apr 2008 12:31:10 +0000 Subject: 2008-04-21 Tatsuhiro Tsujikawa Call FileAllocationMan::nextFileAllocationEntryExists() first. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat waste of time because it is more likey false. * src/FileAllocationDispatcherCommand.cc (execute) --- src/FileAllocationDispatcherCommand.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/FileAllocationDispatcherCommand.cc') diff --git a/src/FileAllocationDispatcherCommand.cc b/src/FileAllocationDispatcherCommand.cc index ae73b7e9..37b32a88 100644 --- a/src/FileAllocationDispatcherCommand.cc +++ b/src/FileAllocationDispatcherCommand.cc @@ -57,8 +57,8 @@ bool FileAllocationDispatcherCommand::execute() if(_e->_requestGroupMan->downloadFinished() || _e->isHaltRequested()) { return true; } - if(!_e->_fileAllocationMan->isFileAllocationBeingExecuted() && - _e->_fileAllocationMan->nextFileAllocationEntryExists()) { + if(_e->_fileAllocationMan->nextFileAllocationEntryExists() && + !_e->_fileAllocationMan->isFileAllocationBeingExecuted()) { FileAllocationEntryHandle entry = _e->_fileAllocationMan->popNextFileAllocationEntry(); int32_t newCUID = CUIDCounterSingletonHolder::instance()->newID(); logger->info(MSG_FILE_ALLOCATION_DISPATCH, newCUID); -- cgit