diff --git a/Source/Thunder/Controller.cpp b/Source/Thunder/Controller.cpp index db9fb0b32..ac5c85635 100644 --- a/Source/Thunder/Controller.cpp +++ b/Source/Thunder/Controller.cpp @@ -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 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; + } } }