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:
parent
7571dbdc1b
commit
ca5e7f1946
@ -450,6 +450,8 @@ void VirtualNetworkReserve::request_execute(
|
||||
if (rvn != 0)
|
||||
{
|
||||
vnpool->drop(rvn, att.resp_msg);
|
||||
|
||||
rvn->unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user