From a48d204b3ea74d34b7ee5871dc5032e4b55a517b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Tue, 6 Mar 2012 16:31:12 +0100 Subject: [PATCH] Feature #1112: RMVMachine save as method: solve image left with its mutex locked, remove PUBLIC att. from new template --- src/rm/RequestManagerVirtualMachine.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rm/RequestManagerVirtualMachine.cc b/src/rm/RequestManagerVirtualMachine.cc index 24e3cd17aa..828178bff8 100644 --- a/src/rm/RequestManagerVirtualMachine.cc +++ b/src/rm/RequestManagerVirtualMachine.cc @@ -451,7 +451,9 @@ void VirtualMachineSaveDisk::request_execute(xmlrpc_c::paramList const& paramLis // Get the data of the Image to be saved // ------------------------------------------------------------------------- - if ( (img = ipool->get(iid_orig, true)) != 0 ) + img = ipool->get(iid_orig, true); + + if ( img == 0 ) { failure_response(NO_EXISTS, get_error(object_name(PoolObjectSQL::IMAGE), iid_orig), @@ -493,7 +495,6 @@ void VirtualMachineSaveDisk::request_execute(xmlrpc_c::paramList const& paramLis ostringstream oss; oss << "NAME = \"" << img_name << "\"" << endl; - oss << "PUBLIC = NO" << endl; oss << "SIZE = " << size << endl; oss << "FS_TYPE = save_as" << endl;