From bd44f393d9c098b4887e20e52ff8c0dec07afe57 Mon Sep 17 00:00:00 2001 From: JackLivio Date: Thu, 4 Apr 2019 10:12:30 -0400 Subject: Add clarifying comment --- src/components/application_manager/src/rpc_handler_impl.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/application_manager/src/rpc_handler_impl.cc b/src/components/application_manager/src/rpc_handler_impl.cc index 8719fa4da0..156abfbed8 100644 --- a/src/components/application_manager/src/rpc_handler_impl.cc +++ b/src/components/application_manager/src/rpc_handler_impl.cc @@ -80,8 +80,12 @@ void RPCHandlerImpl::ProcessMessageFromMobile( std::shared_ptr response( MessageHelper::CreateNegativeResponse(message->connection_key(), message->function_id(), - message->correlation_id(), + 0, mobile_apis::Result::INVALID_ID)); + // CreateNegativeResponse() takes a uint32_t for correlation_id, therefore a + // negative number cannot be passed to that function or else it will be + // improperly cast. correlation_id is reassigned below to its original + // value. (*response)[strings::params][strings::correlation_id] = message->correlation_id(); (*response)[strings::msg_params][strings::info] = -- cgit v1.2.1