bug #1838: Check VNC states in sunstone server

This commit is contained in:
Daniel Molina committed 2013-05-06 12:57:51 +02:00
1 parent 4e3ec40d3e
commit 7d5bdda0c6
1 file changed
+2 -2
+2 -2
View File
@@ -142,8 +142,8 @@ class OpenNebulaVNC
return error(400, "VNC Proxy is not running")
end
if vm_resource['LCM_STATE'] != "3"
return error(400,"VM is not running")
if !VNC_STATES.include?(vm_resource['LCM_STATE'])
return error(400,"Wrong state (#{vm_resource['LCM_STATE']}) to open a VNC session")
end
if vm_resource['TEMPLATE/GRAPHICS/TYPE'].nil? ||