feature #523: Fixed wrong transitions for DISABLED

This commit is contained in:
Ruben S. Montero committed 2011-03-30 14:38:19 +02:00
1 parent 457695f934
commit 5549b68737
1 file changed
+3 -1
+3 -1
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;