diff options
author | h6w <tudor@tudorholton.com> | 2017-10-26 16:27:15 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-26 16:27:15 +1100 |
commit | 874e2edd62e7b28dc7aec06828f08d3581cc788d (patch) | |
tree | 522c2b426dce2091bb9d3ae4d34f16d72f9c88e7 /endpoints | |
parent | 029010232d46acfddaea24e92ab6f27b21456666 (diff) | |
parent | 0e92cd0d0f8b0b53e04aec445ac09193fb802d5d (diff) | |
download | phpvirtualbox-874e2edd62e7b28dc7aec06828f08d3581cc788d.zip phpvirtualbox-874e2edd62e7b28dc7aec06828f08d3581cc788d.tar.gz phpvirtualbox-874e2edd62e7b28dc7aec06828f08d3581cc788d.tar.bz2 |
Merge pull request #61 from tschoening/proc_desc_and_cpu_id_gaps
#53: Some CPUs might have gaps in their IDs and querying VirtualBox…
Diffstat (limited to 'endpoints')
-rw-r--r-- | endpoints/lib/vboxconnector.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/endpoints/lib/vboxconnector.php b/endpoints/lib/vboxconnector.php index 3b6e00b..9894f96 100644 --- a/endpoints/lib/vboxconnector.php +++ b/endpoints/lib/vboxconnector.php @@ -3390,8 +3390,10 @@ class vboxconnector { /* * Processors */ - for($i = 0; $i < $host->processorCount; $i++) { - $response['cpus'][$i] = $host->getProcessorDescription($i); + // TODO https://github.com/phpvirtualbox/phpvirtualbox/issues/53
+ $response['cpus'][0] = $host->getProcessorDescription(0);
+ for($i = 1; $i < $host->processorCount; $i++) {
+ $response['cpus'][$i] = $response['cpus'][0];
} /* |