summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Lytvynenko (GitHub) <ILytvynenko@luxoft.com>2018-04-05 17:56:48 +0300
committerGitHub <noreply@github.com>2018-04-05 17:56:48 +0300
commitb3b9a63c0512d099d5da976d13ce858ff45b4647 (patch)
treea23aff43d313244c2301140c6b0fc35596a9b72d
parentd1650b1cd87338009dc6e92d9ef93ed787e22419 (diff)
parent88376ce6e740650310b59fdff8b747d9bb88ddd6 (diff)
downloadsdl_core-feature/new_remote_control_modules.tar.gz
Merge pull request #2112 from LitvinenkoIra/fix/on_rc_statusfeature/new_remote_control_modules
Fix SDL sends multiple OnRCStatus notification in case of app unregistration
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
index 7b0ea5f41a..f8e64a1570 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
@@ -145,6 +145,7 @@ void ResourceAllocationManagerImpl::ProcessApplicationPolicyUpdate() {
if (rc_extention) {
rc_extention->UnsubscribeFromInteriorVehicleData(*module);
}
+ SendOnRCStatusNotification();
}
}
}
@@ -309,7 +310,6 @@ void ResourceAllocationManagerImpl::SetResourceFree(
}
allocated_resources_.erase(allocation);
LOG4CXX_DEBUG(logger_, "Resource " << module_type << " is released.");
- SendOnRCStatusNotification();
}
std::vector<std::string>
@@ -459,7 +459,9 @@ void ResourceAllocationManagerImpl::OnApplicationEvent(
for (; acquired_modules.end() != module; ++module) {
ReleaseResource(*module, application->app_id());
}
-
+ if (!acquired_modules.empty()) {
+ SendOnRCStatusNotification();
+ }
Apps app_list;
app_list.push_back(application);
RemoveAppsSubscriptions(app_list);