diff options
author | Lutz Bichler <Lutz.Bichler@bmw.de> | 2020-11-30 09:44:44 +0100 |
---|---|---|
committer | Lutz Bichler <Lutz.Bichler@bmw.de> | 2020-11-30 09:44:44 +0100 |
commit | 710a8613ee5bd9eb490addecd7f2ee8049c4fd0c (patch) | |
tree | 49215269c551ac7eba482b3d9f6f084f56bf2fd3 /implementation/routing/src/routing_manager_base.cpp | |
parent | 46e6856a1a61f4b24e29c1f2d3ed0b4ee7da0ede (diff) | |
download | vSomeIP-710a8613ee5bd9eb490addecd7f2ee8049c4fd0c.tar.gz |
vsomeip 3.1.20.13.1.20.1
Diffstat (limited to 'implementation/routing/src/routing_manager_base.cpp')
-rw-r--r-- | implementation/routing/src/routing_manager_base.cpp | 9 |
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, |