diff options
author | jacobkeeler <jacob.keeler@livioradio.com> | 2019-05-29 11:17:24 -0400 |
---|---|---|
committer | jacobkeeler <jacob.keeler@livioradio.com> | 2019-05-29 11:17:24 -0400 |
commit | c53b032542b160cfec3aa8f08c0c6342816155b0 (patch) | |
tree | bb68d297a304ba543238309c88436d0d16a4377e | |
parent | 471562ac937459f05c5017842577b3b8dc584243 (diff) | |
download | sdl_core-c53b032542b160cfec3aa8f08c0c6342816155b0.tar.gz |
Fix creation of PublishAppService commandhotfix/publish_app_service_construction
-rw-r--r-- | src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_mobile_command_factory.cc | 11 |
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: |