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

Feature #602: onevnet release returns error if a Lease is not used, this achieves the same behaviour for fixed and ranged networks

This commit is contained in:
Carlos Martín 2011-11-30 12:43:36 +01:00
parent ee6888567a
commit a173e7bd75

View File

@ -490,7 +490,7 @@ int Leases::free_leases(vector<const Attribute*>& vector_leases,
it = leases.find(i_ip);
if ( it == leases.end() || (it->second->used && it->second->vid != -1) )
if ( it == leases.end() || !it->second->used || it->second->vid != -1 )
{
error_msg = "Lease is not on hold.";
return -1;