From 8777194aa270a410b060ce204db0c8005f67a335 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Mon, 18 Oct 2010 23:35:12 +0200 Subject: [PATCH] Fixes compilation issues and bug in saveas image method --- src/rm/RequestManagerPoolInfo.cc | 1 + src/rm/RequestManagerSaveDisk.cc | 7 ++----- src/vmm/VirtualMachineManager.cc | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/rm/RequestManagerPoolInfo.cc b/src/rm/RequestManagerPoolInfo.cc index f52ee541fe..700ebdd4c5 100644 --- a/src/rm/RequestManagerPoolInfo.cc +++ b/src/rm/RequestManagerPoolInfo.cc @@ -57,6 +57,7 @@ void RequestManager::VirtualMachinePoolInfo::execute( break; default: paramList.verifyEnd(4); + return; } // Get the parameters diff --git a/src/rm/RequestManagerSaveDisk.cc b/src/rm/RequestManagerSaveDisk.cc index 15daa0eb15..8392de1794 100644 --- a/src/rm/RequestManagerSaveDisk.cc +++ b/src/rm/RequestManagerSaveDisk.cc @@ -149,14 +149,11 @@ error_vm_get_disk_id: error_authenticate: oss.str(authenticate_error(method_name)); - goto error_common_lock; + goto error_common; error_authorize: oss.str(authorization_error(method_name, "MANAGE", "VM/IMAGE", rc, vm_id)); - goto error_common_lock; - -error_common_lock: - vm->unlock(); + goto error_common; error_common: arrayData.push_back(xmlrpc_c::value_boolean(false)); diff --git a/src/vmm/VirtualMachineManager.cc b/src/vmm/VirtualMachineManager.cc index b06b4ecfc5..7ef025c797 100644 --- a/src/vmm/VirtualMachineManager.cc +++ b/src/vmm/VirtualMachineManager.cc @@ -171,7 +171,11 @@ void VirtualMachineManager::do_action(const string &action, void * arg) if ( arg == 0) { if ( action != ACTION_TIMER && action != ACTION_FINALIZE ) + { return; + } + + vid = -1; } else {