summaryrefslogtreecommitdiffstats
path: root/endpoints/lib
diff options
context:
space:
mode:
authorIan Moore <ian.moore@fireeye.com>2015-08-05 11:19:30 -0400
committerIan Moore <ian.moore@fireeye.com>2015-08-05 11:19:30 -0400
commit021ed6009d780d32b0b60ad06ddccb03fd2a3c30 (patch)
treece31b7428bc71fe785c1cdb90f97cbc58b5b900a /endpoints/lib
parent2e885ced73e8ab79459e42ed3470fbbdd33c3cad (diff)
downloadphpvirtualbox-021ed6009d780d32b0b60ad06ddccb03fd2a3c30.zip
phpvirtualbox-021ed6009d780d32b0b60ad06ddccb03fd2a3c30.tar.gz
phpvirtualbox-021ed6009d780d32b0b60ad06ddccb03fd2a3c30.tar.bz2
5.0-1 2015-08-055.0-1
Diffstat (limited to 'endpoints/lib')
-rw-r--r--endpoints/lib/vboxconnector.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/endpoints/lib/vboxconnector.php b/endpoints/lib/vboxconnector.php
index a96746a..c813f78 100644
--- a/endpoints/lib/vboxconnector.php
+++ b/endpoints/lib/vboxconnector.php
@@ -819,11 +819,6 @@ class vboxconnector {
$data['dedupId'] .= '-'. $data['machineId'] .'-' . $data['name'];
break;
- case 'OnAdditionsStateChanged':
- $data['machineId'] = $eventDataObject->machineId;
- $data['dedupId'] .= '-'. $data['machineId'];
- break;
-
case 'OnCPUChanged':
$data['machineId'] = $data['sourceId'];
$data['cpu'] = $eventDataObject->cpu;
@@ -1297,12 +1292,12 @@ class vboxconnector {
$this->session = $this->websessionManager->getSessionObject($this->vbox->handle);
- $machine->lockMachine($this->session->handle, 'Write');
+ $machine->lockMachine($this->session->handle, 'Shared');
usort($newGroups,'strnatcasecmp');
if($this->settings->phpVboxGroups) {
- $machine->setExtraData(vboxconnector::phpVboxGroupKey, implode(',',$newGroups));
+ $this->session->machine->setExtraData(vboxconnector::phpVboxGroupKey, implode(',', $newGroups));
} else {
$this->session->machine->groups = $newGroups;
}
@@ -1318,6 +1313,13 @@ class vboxconnector {
$this->errors[] = $e;
$response['errored'] = true;
+ try {
+ $this->session->unlockMachine();
+ unset($this->session);
+ } catch (Exception $e) {
+ // pass
+ }
+
continue;
}