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

bug #344: Check save_disk return code

This commit is contained in:
Ruben S. Montero 2010-09-10 15:49:47 +02:00
parent ce1bd84153
commit 712b826dd7

View File

@ -112,7 +112,13 @@ void RequestManager::VirtualMachineSaveDisk::execute(
goto error_vm_get;
}
vm->save_disk(disk_id, img_id);
rc = vm->save_disk(disk_id, img_id);
if ( rc == -1 )
{
vm->unlock();
goto error_vm_get_disk_id;
}
VirtualMachineSaveDisk::vmpool->update(vm);
@ -137,6 +143,10 @@ error_vm_get:
oss.str(get_error(method_name, "VM", vm_id));
goto error_common;
error_vm_get_disk_id:
oss.str(get_error(method_name, "DISK from VM", vm_id));
goto error_common;
error_authenticate:
oss.str(authenticate_error(method_name));
goto error_common_lock;