Author: jfthomps
Date: Fri Apr 27 16:43:56 2012
New Revision: 1331495

URL: http://svn.apache.org/viewvc?rev=1331495&view=rev
Log:
VCL-276
log Block reservation data

utils.php: modified allocComputer - moved initial declaration of fromblock from 
array definition to inside each foreach so the last return would return an 
empty array if no computers were found

Modified:
    incubator/vcl/trunk/web/.ht-inc/utils.php

Modified: incubator/vcl/trunk/web/.ht-inc/utils.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/utils.php?rev=1331495&r1=1331494&r2=1331495&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/utils.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/utils.php Fri Apr 27 16:43:56 2012
@@ -4240,7 +4240,7 @@ function schCheckMaintenance($start, $en
 
////////////////////////////////////////////////////////////////////////////////
 function allocComputer($blockids, $currentids, $computerids, $start,
                        $nowfuture) {
-       $ret = array('fromblock' => 0);
+       $ret = array();
        if(SCHEDULER_ALLOCATE_RANDOM_COMPUTER) {
                shuffle($blockids);
                shuffle($currentids);
@@ -4263,6 +4263,7 @@ function allocComputer($blockids, $curre
                $ret['compid'] = $compid;
                $ret['mgmtid'] = $mgmtnodeid;
                $ret['loaded'] = 1;
+               $ret['fromblock'] = 0;
                return $ret;
        }
        foreach($computerids as $compid) {
@@ -4272,6 +4273,7 @@ function allocComputer($blockids, $curre
                $ret['compid'] = $compid;
                $ret['mgmtid'] = $mgmtnodeid;
                $ret['loaded'] = 0;
+               $ret['fromblock'] = 0;
                return $ret;
        }
        return $ret;


Reply via email to