From cfe373cbbf6586af24e435bcb5dafa55c1a01676 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 21 Apr 2008 12:31:10 +0000 Subject: [PATCH] 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) --- ChangeLog | 7 +++++++ src/FileAllocationDispatcherCommand.cc | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bfd09471..a121e9e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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) + 2008-04-21 Tatsuhiro Tsujikawa Now HTTP status and version are a member variable of HttpHeader. 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);