summaryrefslogtreecommitdiff
path: root/implementation/routing/src/routing_manager_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'implementation/routing/src/routing_manager_base.cpp')
-rw-r--r--implementation/routing/src/routing_manager_base.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/implementation/routing/src/routing_manager_base.cpp b/implementation/routing/src/routing_manager_base.cpp
index 5b1149e..e187d93 100644
--- a/implementation/routing/src/routing_manager_base.cpp
+++ b/implementation/routing/src/routing_manager_base.cpp
@@ -176,7 +176,10 @@ void routing_manager_base::release_service(client_t _client,
if (found_service != local_services_history_.end()) {
auto found_instance = found_service->second.find(_instance);
if (found_instance != found_service->second.end()) {
- local_services_history_.erase(_service);
+ found_service->second.erase(_instance);
+ if (found_service->second.empty()) {
+ local_services_history_.erase(_service);
+ }
}
}
}
@@ -1136,10 +1139,11 @@ bool routing_manager_base::send_local_notification(client_t _client,
_data[VSOMEIP_METHOD_POS_MAX]);
service_t its_service = VSOMEIP_BYTES_TO_WORD(
_data[VSOMEIP_SERVICE_POS_MIN], _data[VSOMEIP_SERVICE_POS_MAX]);
+
std::shared_ptr<event> its_event = find_event(its_service, _instance, its_method);
if (its_event && !its_event->is_shadow()) {
-
for (auto its_client : its_event->get_subscribers()) {
+
// local
if (its_client == VSOMEIP_ROUTING_CLIENT) {
has_remote = true;
@@ -1150,6 +1154,7 @@ bool routing_manager_base::send_local_notification(client_t _client,
has_local = true;
}
#endif
+
std::shared_ptr<endpoint> its_local_target = ep_mgr_->find_local(its_client);
if (its_local_target) {
send_local(its_local_target, _client, _data, _size,