LivoxGen1: Check for 3 '.'s in smo-ip

This commit is contained in:
2025-09-15 13:05:58 -04:00
parent db8f047322
commit 7b699d5d36
+2 -1
View File
@@ -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 "