diff --git a/src/rm/RequestManagerVirtualNetwork.cc b/src/rm/RequestManagerVirtualNetwork.cc index da1859f28b..b8f424254f 100644 --- a/src/rm/RequestManagerVirtualNetwork.cc +++ b/src/rm/RequestManagerVirtualNetwork.cc @@ -450,6 +450,8 @@ void VirtualNetworkReserve::request_execute( if (rvn != 0) { vnpool->drop(rvn, att.resp_msg); + + rvn->unlock(); } } diff --git a/src/vnm/AddressRange.cc b/src/vnm/AddressRange.cc index c3f3cfbf72..ce955264ea 100644 --- a/src/vnm/AddressRange.cc +++ b/src/vnm/AddressRange.cc @@ -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;