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

Prevent deadlock when reservations fail with the same name.

This commit is contained in:
Ruben S. Montero 2016-06-19 00:38:08 +02:00
parent 7571dbdc1b
commit ca5e7f1946
2 changed files with 7 additions and 5 deletions

View File

@ -450,6 +450,8 @@ void VirtualNetworkReserve::request_execute(
if (rvn != 0)
{
vnpool->drop(rvn, att.resp_msg);
rvn->unlock();
}
}

View File

@ -630,6 +630,11 @@ int AddressRange::ip_to_i(const string& _ip, unsigned int& i_ip) const
string ip = _ip;
if ( ip.find_first_not_of("0123456789.") != std::string::npos )
{
return -1;
}
while ( (pos = ip.find('.')) != string::npos )
{
ip.replace(pos,1," ");
@ -641,11 +646,6 @@ int AddressRange::ip_to_i(const string& _ip, unsigned int& i_ip) const
return -1;
}
if ( ip.find_first_not_of("0123456789 ") != std::string::npos )
{
return -1;
}
iss.str(ip);
i_ip = 0;