summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc
index 7a62f7a4c7..76be96cf8f 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc
@@ -111,9 +111,15 @@ app_mngr::CommandCreator& AppServiceMobileCommandFactory::buildCommandCreator(
switch (function_id) {
case mobile_apis::FunctionID::PublishAppServiceID:
- return mobile_apis::messageType::request == message_type
- ? factory.GetCreator<commands::PublishAppServiceRequest>()
- : factory.GetCreator<commands::PublishAppServiceResponse>();
+ if (app_mngr::commands::Command::CommandSource::SOURCE_MOBILE == source &&
+ mobile_apis::messageType::response != message_type) {
+ return factory.GetCreator<commands::PublishAppServiceRequest>();
+ } else if (app_mngr::commands::Command::CommandSource::SOURCE_SDL ==
+ source &&
+ mobile_apis::messageType::request != message_type) {
+ return factory.GetCreator<commands::PublishAppServiceResponse>();
+ }
+ break;
case mobile_apis::FunctionID::OnAppServiceDataID:
return app_mngr::commands::Command::CommandSource::SOURCE_MOBILE == source
? factory.GetCreator<