1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

bug #293: Enable/disable transitions fixed.

This commit is contained in:
Carlos Martín 2010-07-23 16:06:25 +02:00 committed by Ruben S. Montero
parent 1663f7872a
commit f98e5bbf7c

View File

@ -159,11 +159,14 @@ public:
{
int rc = 0;
if ((to_enable == true) && (state == DISABLED))
if ( to_enable == true )
{
state = READY;
if(state == DISABLED)
{
state = READY;
}
}
else if ((to_enable == false) && (state == READY))
else if (state != USED) // to_enable == false
{
state = DISABLED;
}