Enable compatibility with older versions of libconfig (such as the one shipped with RHEL/CentOS 7)

This commit is contained in:
Kevin Abraham
2020-11-22 12:12:29 -05:00
parent 4c582241d5
commit 28a93b2df4
13 changed files with 44 additions and 44 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ std::shared_ptr<Action> Action::makeAction(Device *device, libconfig::Setting
}
try {
auto& action_type = setting.lookup("type");
auto& action_type = setting["type"];
if(action_type.getType() != libconfig::Setting::TypeString) {
logPrintf(WARN, "Line %d: Action type must be a string",
@@ -76,4 +76,4 @@ std::shared_ptr<Action> Action::makeAction(Device *device, libconfig::Setting
setting.getSourceLine());
throw InvalidAction();
}
}
}