summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2016-03-03 15:34:22 -0500
committerJackLivio <jack@livio.io>2016-03-03 15:34:22 -0500
commit07932236fdcea807c1c0bb7092772b075ba6ee65 (patch)
treefc00ede0cea5baa222ba88123c8bf040ad144e47
parentbe8feae0e11c59e20f8c9b08c32f7f64937e0ee4 (diff)
downloadsdl_core-hotfix/fix_pt_sendMessagetoSDK.tar.gz
Fix for sending policy table snapshothotfix/fix_pt_sendMessagetoSDK
Policy handler was checking an unimplemented contained last_used_app_ids_. Replaced with 'GetAppIdForSending() to properly find app id to send policy snapshot to. Also in message_helper.cc, I fixed the url paremeter to what actually corresponds to onSystemRequests in the mobile_api.xml
-rw-r--r--src/components/application_manager/src/message_helper.cc2
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc7
2 files changed, 3 insertions, 6 deletions
diff --git a/src/components/application_manager/src/message_helper.cc b/src/components/application_manager/src/message_helper.cc
index bbe5bad19b..adb4f94457 100644
--- a/src/components/application_manager/src/message_helper.cc
+++ b/src/components/application_manager/src/message_helper.cc
@@ -1934,7 +1934,7 @@ void MessageHelper::SendPolicySnapshotNotification(
SmartObject content (SmartType_Map);
if (!url.empty()) {
- content[strings::msg_params][mobile_notification::syncp_url] = url;
+ content[strings::msg_params][strings::url] = url;
}
content[strings::msg_params][strings::request_type] = RequestType::HTTP;
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 6497ebf2ee..31d8099433 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -730,11 +730,8 @@ bool PolicyHandler::SendMessageToSDK(const BinaryMessage& pt_string,
LOG4CXX_AUTO_TRACE(logger_);
POLICY_LIB_CHECK(false);
- if (last_used_app_ids_.empty()) {
- LOG4CXX_WARN(logger_, "last_used_app_ids_ is empty");
- return false;
- }
- uint32_t app_id = last_used_app_ids_.back();
+
+ uint32_t app_id = GetAppIdForSending();
ApplicationSharedPtr app =
ApplicationManagerImpl::instance()->application(app_id);