summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2019-05-29 12:01:42 -0400
committerGitHub <noreply@github.com>2019-05-29 12:01:42 -0400
commite5301059e4a5510a65ee55081b51844697d3ff56 (patch)
treebb68d297a304ba543238309c88436d0d16a4377e
parent471562ac937459f05c5017842577b3b8dc584243 (diff)
parentc53b032542b160cfec3aa8f08c0c6342816155b0 (diff)
downloadsdl_core-e5301059e4a5510a65ee55081b51844697d3ff56.tar.gz
Merge pull request #2933 from smartdevicelink/hotfix/publish_app_service_construction
Fix creation of PublishAppService command
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc11
1 files changed, 7 insertions, 4 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 795de4838e..e8db20bdea 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,10 +111,13 @@ app_mngr::CommandCreator& AppServiceMobileCommandFactory::buildCommandCreator(
switch (function_id) {
case mobile_apis::FunctionID::PublishAppServiceID:
- if (app_mngr::commands::Command::CommandSource::SOURCE_MOBILE == source) {
- 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: