2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Call FileAllocationMan::nextFileAllocationEntryExists() first.
	Calling FileAllocationMan::isFileAllocationBeingExecuted() is 
somwhat
	waste of time because it is more likey false.
	* src/FileAllocationDispatcherCommand.cc (execute)
pull/1/head
Tatsuhiro Tsujikawa 2008-04-21 12:31:10 +00:00
parent e1fa62e6c7
commit cfe373cbbf
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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 <tujikawa at rednoah dot com>
Now HTTP status and version are a member variable of HttpHeader.

View File

@ -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);