"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/web/lib/fog/storagenode.class.php" between
fogproject-1.5.7.tar.gz and fogproject-1.5.8.tar.gz

About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.

storagenode.class.php  (fogproject-1.5.7):storagenode.class.php  (fogproject-1.5.8)
skipping to change at line 306 skipping to change at line 306
$this->set('usedtasks', (array)$used); $this->set('usedtasks', (array)$used);
} }
/** /**
* Gets this node's used count. * Gets this node's used count.
* *
* @return int * @return int
*/ */
public function getUsedSlotCount() public function getUsedSlotCount()
{ {
$countTasks = 0; $countTasks = 0;
$multicastTaskID = array(8);
$usedtasks = $this->get('usedtasks'); $usedtasks = $this->get('usedtasks');
$findTasks = array( $findTasks = array(
'stateID' => self::getProgressState(), 'stateID' => self::getProgressState(),
'storagenodeID' => $this->get('id'), 'storagenodeID' => $this->get('id'),
'typeID' => $usedtasks, 'typeID' => array_diff($this->get('usedtasks'), $multicastTaskID),
); );
$countTasks = self::getClass('TaskManager')->count($findTasks); $countTasks = self::getClass('TaskManager')->count($findTasks);
$index = array_search(8, $usedtasks); $index = array_search(8, $usedtasks);
if ($index === false) { if ($index === false) {
return $countTasks; return $countTasks;
} }
$MulticastCount = self::getSubObjectIDs( $MulticastCount = self::getSubObjectIDs(
'MulticastSessionAssociation', 'MulticastSession',
array( array(
'taskID' => self::getSubObjectIDs( 'stateID' => self::getProgressState()
'Task',
array(
'stateID' => self::getProgressState(),
'typeID' => 8,
)
), ),
),
'msID' 'msID'
); );
$countTasks += count($MulticastCount);
$countTasks += count($MulticastCount);
return $countTasks; return $countTasks;
} }
/** /**
* Gets the queued hosts on this node. * Gets the queued hosts on this node.
* *
* @return int * @return int
*/ */
public function getQueuedSlotCount() public function getQueuedSlotCount()
{ {
$countTasks = 0; $countTasks = 0;
$multicastTaskID = array(8);
$usedtasks = $this->get('usedtasks'); $usedtasks = $this->get('usedtasks');
$findTasks = array( $findTasks = array(
'stateID' => self::getQueuedStates(), 'stateID' => self::getQueuedStates(),
'storagenodeID' => $this->get('id'), 'storagenodeID' => $this->get('id'),
'typeID' => $usedtasks, 'typeID' => array_diff($this->get('usedtasks'), $multicastTaskID),
); );
$countTasks = self::getClass('TaskManager')->count($findTasks); $countTasks = self::getClass('TaskManager')->count($findTasks);
$index = array_search(8, $usedtasks); $index = array_search(8, $usedtasks);
if ($index === false) { if ($index === false) {
return $countTasks; return $countTasks;
} }
$MulticastCount = self::getSubObjectIDs( $MulticastCount = self::getSubObjectIDs(
'MulticastSessionAssociation', 'MulticastSession',
array( array('stateID' => self::getQueuedStates()),
'taskID' => self::getSubObjectIDs(
'Task',
array(
'stateID' => self::getQueuedStates(),
'typeID' => 8,
)
),
),
'msID' 'msID'
); );
$countTasks += count($MulticastCount); $countTasks += count($MulticastCount);
return $countTasks; return $countTasks;
} }
} }
 End of changes. 11 change blocks. 
22 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)