diff options
author | jacobkeeler <jacob.keeler@livioradio.com> | 2019-03-05 18:50:50 -0500 |
---|---|---|
committer | jacobkeeler <jacob.keeler@livioradio.com> | 2019-03-05 18:50:50 -0500 |
commit | 24be2c57bb2965d29c86f6891346b6491bcf08e6 (patch) | |
tree | 69babe8db2216ec15ad4b9885aa1cfaae0bf9b79 /src/components/application_manager/rpc_plugins | |
parent | 25850f0eaab20ef8166ad851343b2d9de5b26127 (diff) | |
download | sdl_core-24be2c57bb2965d29c86f6891346b6491bcf08e6.tar.gz |
Fix stylefeature/protect_published_services
Diffstat (limited to 'src/components/application_manager/rpc_plugins')
-rw-r--r-- | src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc index e198cc0fcd..2c6ba414e0 100644 --- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc +++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification.cc @@ -64,17 +64,15 @@ void OnAppServiceDataNotification::Run() { std::string service_id = (*message_)[strings::msg_params][strings::service_data] - [strings::service_id] - .asString(); - auto service = application_manager_.GetAppServiceManager().FindServiceByID(service_id); - + [strings::service_id].asString(); + auto service = + application_manager_.GetAppServiceManager().FindServiceByID(service_id); + if (!service) { LOG4CXX_ERROR(logger_, "Service sending OnAppServiceData is not published"); return; - } else if (!service - ->record[strings::service_manifest] - [strings::allow_app_consumers] - .asBool()) { + } else if (!service->record[strings::service_manifest] + [strings::allow_app_consumers].asBool()) { LOG4CXX_ERROR(logger_, "Service does not allow for app consumers, skipping mobile " "OnAppServiceData notification"); @@ -83,8 +81,7 @@ void OnAppServiceDataNotification::Run() { std::string service_type = (*message_)[strings::msg_params][strings::service_data] - [strings::service_type] - .asString(); + [strings::service_type].asString(); auto subscribed_to_app_service_predicate = [service_type](const ApplicationSharedPtr app) { |