stephb9959
2022-09-02 08:03:48 -07:00
parent 8b3e1326b7
commit 6df780dba3
4 changed files with 63 additions and 4 deletions

View File

@@ -543,9 +543,18 @@ namespace OpenWifi {
inline bool ValidRRM(const std::string &v) {
if((v=="no") || (v=="inherit")) return true;
auto parts = Poco::StringTokenizer(v,":");
if(parts.count()!=4) return false;
return ValidSchedule(parts[2]);
try {
Poco::JSON::Parser P;
auto O = P.parse(v).extract<Poco::JSON::Object::Ptr>();
ProvObjects::RRMDetails D;
if(D.from_json(O)) {
return ValidSchedule(D.schedule);
}
} catch (...) {
}
return false;
}
inline bool ValidDeviceRules(const ProvObjects::DeviceRules & DR) {