summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShobhit Adlakha <ShobhitAd@users.noreply.github.com>2019-04-26 14:01:42 -0400
committerGitHub <noreply@github.com>2019-04-26 14:01:42 -0400
commit2ae92b00188c3646c0db2ab18d7b5400f5ab25e2 (patch)
treee5df9219c632e6a469579387649cce8461e17695
parent873d1b6b503371c50a69a1c9e8ce7453e91e960b (diff)
downloadsdl_core-hotfix/reject_duplicate_services.tar.gz
Apply suggestions from code reviewhotfix/reject_duplicate_services
Co-Authored-By: jacobkeeler <jacob.keeler@livioradio.com>
-rw-r--r--src/components/application_manager/include/application_manager/app_service_manager.h2
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/components/application_manager/include/application_manager/app_service_manager.h b/src/components/application_manager/include/application_manager/app_service_manager.h
index 90771ff3b0..4c661cae0a 100644
--- a/src/components/application_manager/include/application_manager/app_service_manager.h
+++ b/src/components/application_manager/include/application_manager/app_service_manager.h
@@ -252,7 +252,7 @@ class AppServiceManager {
/**
* @brief Get the service of a given type published by a given provider.
* @param connection_key - The connection key of the service provider
- * @param service_type - The service ID
+ * @param service_type - The service type
* @return A pointer to requested service on success, NULL on failure
*/
AppService* FindServiceByProvider(const uint32_t connection_key,
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc
index d60f5d9a88..35a3e8a6b3 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_publish_app_service_request.cc
@@ -63,7 +63,7 @@ void ASPublishAppServiceRequest::Run() {
smart_objects::SmartObject service_record =
application_manager_.GetAppServiceManager().PublishAppService(manifest,
false);
- if (smart_objects::SmartType_Map != service_record.getType()) {
+ if (service_record.empty()) {
SendErrorResponse(
(*message_)[strings::params][strings::correlation_id].asUInt(),
hmi_apis::FunctionID::AppService_PublishAppService,
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc
index 65e3ffb3da..86819b44ad 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/publish_app_service_request.cc
@@ -111,7 +111,7 @@ void PublishAppServiceRequest::Run() {
application_manager_.GetAppServiceManager().PublishAppService(
manifest, true, connection_key());
- if (smart_objects::SmartType_Map != service_record.getType()) {
+ if (service_record.empty()) {
SendResponse(
false, mobile_apis::Result::REJECTED, "Failed to publish service");
return;