fix device sections shadowing parse errors

This commit is contained in:
vaxerski 2022-07-12 16:07:51 +02:00
parent 3914672dd5
commit ad03360665

View file

@ -159,6 +159,7 @@ void CConfigManager::init() {
void CConfigManager::configSetValueSafe(const std::string& COMMAND, const std::string& VALUE) { void CConfigManager::configSetValueSafe(const std::string& COMMAND, const std::string& VALUE) {
if (configValues.find(COMMAND) == configValues.end()) { if (configValues.find(COMMAND) == configValues.end()) {
if (COMMAND.find("device:") != 0 /* devices parsed later */) {
if (COMMAND[0] == '$') { if (COMMAND[0] == '$') {
// register a dynamic var // register a dynamic var
Debug::log(LOG, "Registered dynamic var \"%s\" -> %s", COMMAND.c_str(), VALUE.c_str()); Debug::log(LOG, "Registered dynamic var \"%s\" -> %s", COMMAND.c_str(), VALUE.c_str());
@ -167,9 +168,6 @@ void CConfigManager::configSetValueSafe(const std::string& COMMAND, const std::s
parseError = "Error setting value <" + VALUE + "> for field <" + COMMAND + ">: No such field."; parseError = "Error setting value <" + VALUE + "> for field <" + COMMAND + ">: No such field.";
} }
if (COMMAND.find("device:") == 0 /* devices parsed later */) {
parseError = "";
} else {
return; return;
} }
} }