summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2019-01-24 11:05:40 -0500
committerJackLivio <jack@livio.io>2019-01-24 11:05:40 -0500
commitcb01cd11870ce4642ba49f7b86d4bd45562f2f1d (patch)
treee82749e1a29bed23498885336697786f41f2672f /src/components
parentf1c9edcbcf2822cc93a38810a592bc6412070214 (diff)
downloadsdl_core-cb01cd11870ce4642ba49f7b86d4bd45562f2f1d.tar.gz
Check if handled_rpcs is null
Diffstat (limited to 'src/components')
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc2
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc16
2 files changed, 10 insertions, 8 deletions
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc
index 20036cc30a..6a9dc8f1a7 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc
@@ -75,7 +75,7 @@ void OnAppServiceDataNotificationFromMobile::Run() {
ApplicationSharedPtr app = application_manager_.application(connection_key());
bool result = policy_handler_.CheckAppServiceParameters(
- app->policy_app_id(), std::string(), service_type, {});
+ app->policy_app_id(), std::string(), service_type, NULL);
if (!result) {
LOG4CXX_DEBUG(logger_,
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 480b8f0574..cbe9dd6812 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -1966,13 +1966,15 @@ bool PolicyHandler::CheckAppServiceParameters(
return false;
}
- for (auto requested_it = requested_handled_rpcs->begin();
- requested_it != requested_handled_rpcs->end();
- ++requested_it) {
- auto find_result = std::find(
- handled_rpcs.begin(), handled_rpcs.end(), requested_it->asUInt());
- if (find_result == handled_rpcs.end()) {
- return false;
+ if (requested_handled_rpcs) {
+ for (auto requested_it = requested_handled_rpcs->begin();
+ requested_it != requested_handled_rpcs->end();
+ ++requested_it) {
+ auto find_result = std::find(
+ handled_rpcs.begin(), handled_rpcs.end(), requested_it->asUInt());
+ if (find_result == handled_rpcs.end()) {
+ return false;
+ }
}
}
return true;