/* */ #include "FileAllocationDispatcherCommand.h" #include "FileAllocationCommand.h" #include "message.h" bool FileAllocationDispatcherCommand::execute() { if(_e->_requestGroupMan->downloadFinished()) { return true; } if(!_e->_fileAllocationMan->isFileAllocationBeingExecuted() && _e->_fileAllocationMan->nextFileAllocationEntryExists()) { FileAllocationEntryHandle entry = _e->_fileAllocationMan->popNextFileAllocationEntry(); logger->info(MSG_FILE_ALLOCATION_DISPATCH, entry->getCUID()); FileAllocationCommand* command = new FileAllocationCommand(entry->getCUID(), entry->getRequestGroup(), _e, entry); _e->commands.push_back(command); _e->noWait = true; } _e->commands.push_back(this); return false; }