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

feature #523: Fixed wrong transitions for DISABLED

This commit is contained in:
Ruben S. Montero 2011-03-30 14:38:19 +02:00
parent 457695f934
commit 5549b68737

View File

@ -249,6 +249,7 @@ int ImageManager::enable_image(int iid, bool to_enable)
case Image::ERROR:
img->set_state(Image::READY);
ipool->update(img);
case Image::READY:
break;
default:
rc = -1;
@ -259,10 +260,11 @@ int ImageManager::enable_image(int iid, bool to_enable)
{
switch (img->get_state())
{
case Image::USED:
case Image::READY:
case Image::ERROR:
img->set_state(Image::DISABLED);
ipool->update(img);
case Image::DISABLED:
break;
default:
rc = -1;