Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Patch checks if a session is open for the machine and uses the sessio…

…n's data instead of the persistent one.

Common symptom was that vboxweb showed VRDP as disabled although it was enabled at runtime by the process the VM is running in (but not enabled in the VM's configuration) (Achim Hasenmueller).


git-svn-id: http://vboxweb.googlecode.com/svn/trunk@55 729376a8-6c6b-11de-afdd-bb9f892af8c1
  • Loading branch information...
commit 47c61411f0afdec61bcd96f33e7c0e1448fd7364 1 parent d9bc843
vboxweb authored
Showing with 17 additions and 1 deletion.
  1. +17 −1 VBoxWebSrv.py
18 VBoxWebSrv.py
View
@@ -477,9 +477,25 @@ def vboxGetUpdates(self):
if updateType is 0:
arrJSON.append(jsVirtualBox(self.ctx))
+ session = self.ctx['mgr'].getSessionObject(self.ctx['vb'])
+
# Add arrMach to the final JSON array
for m in arrMach:
- arrJSON.append(jsMachine(self.ctx, m.mach))
+ machine = m.mach
+ sessionOpen = 0
+ # if a session for the VM is open, connect to it and use its machine object
+ try:
+ print "Opening session for machine: " + machine.name
+ self.ctx['vb'].openExistingSession(session, machine.id)
+ if session.state == self.ctx['ifaces'].SessionState_Open:
+ sessionOpen = 1
+ except Exception:
+ pass
+ if sessionOpen == 1:
+ machine = session.machine
+ arrJSON.append(jsMachine(self.ctx, machine))
+ if sessionOpen == 1:
+ session.close()
print "%s update, %d machines modified" %("full" if updateType is 0 else "differential", len(arrMach))
if isSimpleJson:
Please sign in to comment.
Something went wrong with that request. Please try again.