diff --git a/senseApis/livoxGen1/livoxGen1.cpp b/senseApis/livoxGen1/livoxGen1.cpp index 47a30da..98eec22 100644 --- a/senseApis/livoxGen1/livoxGen1.cpp +++ b/senseApis/livoxGen1/livoxGen1.cpp @@ -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 "