mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Feature #662: Fix bug in VirtualMachineSaveDisk::request_execute, small changes to error messages
This commit is contained in:
parent
f1331453b7
commit
3579838ac1
@ -231,7 +231,7 @@ string Request::request_error (const string &err_desc, const string &err_detail)
|
||||
|
||||
if (!err_detail.empty())
|
||||
{
|
||||
oss << err_detail;
|
||||
oss << ". " << err_detail;
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
|
@ -40,7 +40,7 @@ void RequestManagerPoolInfoFilter::request_execute(xmlrpc_c::paramList const& pa
|
||||
|
||||
if ( filter_flag < MINE )
|
||||
{
|
||||
failure_response(XML_RPC_API, request_error("Incorrect filter_flag.",""));
|
||||
failure_response(XML_RPC_API, request_error("Incorrect filter_flag",""));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -374,6 +374,7 @@ void VirtualMachineSaveDisk::request_execute(xmlrpc_c::paramList const& paramLis
|
||||
int rc;
|
||||
ostringstream oss;
|
||||
string error_str;
|
||||
char * error_char;
|
||||
|
||||
// ------------------ Template for the new image ------------------
|
||||
|
||||
@ -383,7 +384,7 @@ void VirtualMachineSaveDisk::request_execute(xmlrpc_c::paramList const& paramLis
|
||||
|
||||
itemplate = new ImageTemplate;
|
||||
|
||||
itemplate->parse(oss.str(),0);
|
||||
itemplate->parse(oss.str(), &error_char);
|
||||
|
||||
// ------------------ Authorize the operation ------------------
|
||||
|
||||
@ -423,7 +424,7 @@ void VirtualMachineSaveDisk::request_execute(xmlrpc_c::paramList const& paramLis
|
||||
if ( rc == 0 )
|
||||
{
|
||||
pool->update(vm);
|
||||
};
|
||||
}
|
||||
|
||||
vm->unlock();
|
||||
|
||||
@ -442,8 +443,8 @@ void VirtualMachineSaveDisk::request_execute(xmlrpc_c::paramList const& paramLis
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
success_response(id);
|
||||
// Return the new allocated Image ID
|
||||
success_response(iid);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
@ -34,7 +34,7 @@ string RequestManagerVirtualNetwork::leases_error (char *error)
|
||||
free(error);
|
||||
}
|
||||
|
||||
return request_error("Error modifiying network leases.",oss.str());
|
||||
return request_error("Error modifiying network leases",oss.str());
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -79,7 +79,7 @@ void RequestManagerVirtualNetwork::
|
||||
if ( rc < 0 )
|
||||
{
|
||||
failure_response(INTERNAL,
|
||||
request_error("Error modifiying network leases.",error_str));
|
||||
request_error("Error modifiying network leases",error_str));
|
||||
|
||||
vn->unlock();
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user