diff options
author | Shobhit Adlakha <adlakhashobhit@gmail.com> | 2019-04-29 14:32:05 -0400 |
---|---|---|
committer | Shobhit Adlakha <adlakhashobhit@gmail.com> | 2019-04-29 14:32:05 -0400 |
commit | 52e637e33cf834b846e7ea30940ec622cb066bc3 (patch) | |
tree | 5cb94313c6f157c171be993e57cb956da7bb3fd6 /src/components | |
parent | bbf275372554baa054088c93ed2c0f734694b66e (diff) | |
download | sdl_core-52e637e33cf834b846e7ea30940ec622cb066bc3.tar.gz |
Addressed review commentsfix/building_without_cloudapp_support
Diffstat (limited to 'src/components')
4 files changed, 9 insertions, 5 deletions
diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc index 928f31d4f3..615d3c72cd 100644 --- a/src/components/application_manager/src/application_impl.cc +++ b/src/components/application_manager/src/application_impl.cc @@ -1187,8 +1187,9 @@ const std::string& ApplicationImpl::cloud_app_certificate() const { bool ApplicationImpl::is_cloud_app() const { #if !defined(CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT) return false; -#endif // CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT +#else return !endpoint_.empty(); +#endif // CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT } void ApplicationImpl::set_cloud_app_endpoint(const std::string& endpoint) { diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc index d332dc0e9d..96bb45a6c1 100644 --- a/src/components/policy/policy_external/src/cache_manager.cc +++ b/src/components/policy/policy_external/src/cache_manager.cc @@ -1394,7 +1394,7 @@ void CacheManager::GetEnabledCloudApps( #if !defined(CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT) enabled_apps.clear(); return; -#endif +#else const policy_table::ApplicationPolicies& policies = pt_->policy_table.app_policies_section.apps; for (policy_table::ApplicationPolicies::const_iterator it = policies.begin(); @@ -1405,6 +1405,7 @@ void CacheManager::GetEnabledCloudApps( enabled_apps.push_back((*it).first); } } +#endif // CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT } bool CacheManager::GetCloudAppParameters( diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc index 663ab6ac6b..2556a07709 100644 --- a/src/components/policy/policy_regular/src/cache_manager.cc +++ b/src/components/policy/policy_regular/src/cache_manager.cc @@ -687,7 +687,7 @@ void CacheManager::GetEnabledCloudApps( #if !defined(CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT) enabled_apps.clear(); return; -#endif +#else const policy_table::ApplicationPolicies& policies = pt_->policy_table.app_policies_section.apps; for (policy_table::ApplicationPolicies::const_iterator it = policies.begin(); @@ -698,6 +698,7 @@ void CacheManager::GetEnabledCloudApps( enabled_apps.push_back((*it).first); } } +#endif // CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT } bool CacheManager::GetCloudAppParameters( diff --git a/src/components/transport_manager/src/transport_manager_impl.cc b/src/components/transport_manager/src/transport_manager_impl.cc index 567bc8f135..0c49401c80 100644 --- a/src/components/transport_manager/src/transport_manager_impl.cc +++ b/src/components/transport_manager/src/transport_manager_impl.cc @@ -161,7 +161,7 @@ void TransportManagerImpl::AddCloudDevice( cloud_properties); } } -#endif +#endif // CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT return; } @@ -169,8 +169,9 @@ void TransportManagerImpl::RemoveCloudDevice(const DeviceHandle device_handle) { #if !defined(CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT) LOG4CXX_TRACE(logger_, "Cloud app support is disabled. Exiting function"); return; -#endif +#else DisconnectDevice(device_handle); +#endif // CLOUD_APP_WEBSOCKET_TRANSPORT_SUPPORT } int TransportManagerImpl::ConnectDevice(const DeviceHandle device_handle) { |