summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Dickow <jjdickow@gmail.com>2015-05-12 11:57:59 -0400
committerJustin Dickow <jjdickow@gmail.com>2015-05-12 11:57:59 -0400
commit9429759fa062cc4a42fd22ecb9c25a95ce07081e (patch)
treed715bdb0af86000a4e134b3b03c1f500ffb6a3c1
parent375ed7e0549adedfc72564a5fd0b4ffe9c39cea6 (diff)
downloadsdl_core-hotfix/hybrid_service_to_mobile.tar.gz
Send hybrid service 0x0F if outgoing message has binary datahotfix/hybrid_service_to_mobile
Signed-off-by: Justin Dickow <jjdickow@gmail.com>
-rw-r--r--src/components/application_manager/src/mobile_message_handler.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/components/application_manager/src/mobile_message_handler.cc b/src/components/application_manager/src/mobile_message_handler.cc
index a1c8385549..732faf8a58 100644
--- a/src/components/application_manager/src/mobile_message_handler.cc
+++ b/src/components/application_manager/src/mobile_message_handler.cc
@@ -231,8 +231,13 @@ MobileMessageHandler::HandleOutgoingMessageProtocolV2(
dataForSending[offset++] = jsonSize;
memcpy(dataForSending + offset, message->json_message().c_str(), jsonSize);
-
+
+ // Default the service type to RPC Service
+ uint8_t type = 0x07;
+
if (message->has_binary_data()) {
+ // Change the service type to Hybrid Service
+ type = 0x0F;
const std::vector<uint8_t>& binaryData = *(message->binary_data());
uint8_t* currentPointer = dataForSending + offset + jsonSize;
for (uint32_t i = 0; i < binarySize; ++i) {
@@ -244,7 +249,8 @@ MobileMessageHandler::HandleOutgoingMessageProtocolV2(
new protocol_handler::RawMessage(message->connection_key(),
message->protocol_version(),
dataForSending,
- dataForSendingSize);
+ dataForSendingSize,
+ type);
delete [] dataForSending;