Forráskód Böngészése

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)
Tatsuhiro Tsujikawa 17 éve
szülő
commit
cfe373cbbf
2 módosított fájl, 9 hozzáadás és 2 törlés
  1. 7 0
      ChangeLog
  2. 2 2
      src/FileAllocationDispatcherCommand.cc

+ 7 - 0
ChangeLog

@@ -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.

+ 2 - 2
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);