LivoxGen1: Check for 3 '.'s in smo-ip
This commit is contained in:
@@ -228,7 +228,8 @@ extern "C" void livoxGen1_attachDeviceReq(
|
||||
throw std::runtime_error(
|
||||
std::string(__func__) + ": smo-ip parameter is empty");
|
||||
}
|
||||
if (param.second.find('.') == std::string::npos)
|
||||
if (param.second.find('.') == std::string::npos ||
|
||||
std::count(param.second.begin(), param.second.end(), '.') != 3)
|
||||
{
|
||||
throw std::runtime_error(
|
||||
std::string(__func__) + ": smo-ip parameter is not an "
|
||||
|
||||
Reference in New Issue
Block a user