summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/rpc_passing_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src/rpc_passing_handler.cc')
-rw-r--r--src/components/application_manager/src/rpc_passing_handler.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/components/application_manager/src/rpc_passing_handler.cc b/src/components/application_manager/src/rpc_passing_handler.cc
index 37b01a92f6..3e90b86663 100644
--- a/src/components/application_manager/src/rpc_passing_handler.cc
+++ b/src/components/application_manager/src/rpc_passing_handler.cc
@@ -118,8 +118,20 @@ bool RPCPassingHandler::RPCPassThrough(smart_objects::SmartObject rpc_message) {
PopulateRPCRequestQueue(rpc_message);
} else {
rpc_request_queue_lock_.Release();
- LOG4CXX_DEBUG(logger_, "Correlation id DOES exist in map. Continuing");
- return false;
+ LOG4CXX_DEBUG(logger_, "Correlation id DOES exist in map. Returning");
+ std::shared_ptr<smart_objects::SmartObject> response(
+ MessageHelper::CreateNegativeResponse(
+ rpc_message[strings::params][strings::connection_key].asInt(),
+ rpc_message[strings::params][strings::function_id].asInt(),
+ correlation_id,
+ mobile_apis::Result::INVALID_ID));
+
+ (*response)[strings::msg_params][strings::info] =
+ "Duplicate correlation_id";
+ app_manager_.GetRPCService().ManageMobileCommand(
+ response, commands::Command::SOURCE_SDL);
+
+ return true;
}
rpc_request_queue_lock_.Acquire();