summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2017-03-14 13:11:11 -0400
committerJackLivio <jack@livio.io>2017-03-14 13:11:11 -0400
commit6770210a91270f97066b71276b43d78c9da18b53 (patch)
treea1fef6dbca815075bda7324dc0bf48e9de00074e
parent7c96aee655ecd0753de71cac27be8db02ce6015b (diff)
downloadsdl_core-hotfix/4.3_ptu_attach_binary_data.tar.gz
Attach Binary Data To OnSystemReqeust Messagehotfix/4.3_ptu_attach_binary_data
Before this fix, binary data would only be added to the OnSystemRequest Message if core was built with the EXTENDED_POLICY flag set to Proprietary. In the case core was build with EXTERNAL_PROPRIETARY, the binary policy data would never be sent to the phone.
-rw-r--r--src/components/application_manager/src/commands/mobile/on_system_request_notification.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc b/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc
index b56523e1e5..b6189e4832 100644
--- a/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc
+++ b/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc
@@ -83,16 +83,17 @@ void OnSystemRequestNotification::Run() {
If the requestType = HTTP, add to mobile API fileType = BINARY"
Also in Genivi SDL we don't save the PT to file - we put it directly in
binary_data */
-
-#ifdef PROPRIETARY_MODE
const std::string filename =
(*message_)[strings::msg_params][strings::file_name].asString();
BinaryMessage binary_data;
file_system::ReadBinaryFile(filename, binary_data);
+
+#ifdef PROPRIETARY_MODE
AddHeader(binary_data);
- (*message_)[strings::params][strings::binary_data] = binary_data;
#endif // PROPRIETARY_MODE
+
+ (*message_)[strings::params][strings::binary_data] = binary_data;
(*message_)[strings::msg_params][strings::file_type] = FileType::JSON;
} else if (RequestType::HTTP == request_type) {
(*message_)[strings::msg_params][strings::file_type] = FileType::BINARY;