Skip to content

Commit

Permalink
Merge branch 'master' into development/cmake-enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
bramoosterhuis authored Jun 12, 2024
2 parents 624835f + 2419474 commit 41324f8
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Source/Thunder/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,21 @@ namespace Plugin {
ASSERT(_pluginServer != nullptr);

if (_pluginServer->Services().FromIdentifier(callsign, service) == Core::ERROR_NONE) {
result = service->ConfigLine(configuration);
Core::JSON::Variant config;
Core::OptionalType<Core::JSON::Error> error;
config.FromString(configuration, error);
result = Core::ERROR_INCOMPLETE_CONFIG;
if (error.IsSet() == true) {
SYSLOG(Logging::ParsingError, (_T("Parsing failed with %s"), ErrorDisplayMessage(error.Value()).c_str()));
} else if (config.IsValid() != true) {
SYSLOG(Logging::ParsingError, (_T("Given configuration is not valid")));
} else {
result = service->ConfigLine(configuration);

// Normalise return code
if (result != Core::ERROR_NONE) {
result = Core::ERROR_GENERAL;
// Normalise return code
if (result != Core::ERROR_NONE) {
result = Core::ERROR_GENERAL;
}
}
}

Expand Down

0 comments on commit 41324f8

Please sign in to comment.