MCPcopy Create free account
hub / github.com/COVESA/vsomeip / remove_subscriptions

Method remove_subscriptions

implementation/routing/src/routing_manager_impl.cpp:3682–3706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3680}
3681
3682void routing_manager_impl::remove_subscriptions(port_t _local_port, const boost::asio::ip::address& _remote_address, port_t _remote_port) {
3683
3684 eventgroups_t its_eventgroups;
3685 {
3686 std::scoped_lock its_lock{eventgroups_mutex_};
3687 its_eventgroups = eventgroups_;
3688 }
3689
3690 for (const auto& [key, its_eventgroup] : its_eventgroups) {
3691 for (const auto& [eventgroup_id, its_info] : its_eventgroup) {
3692 for (auto its_subscription : its_info->get_remote_subscriptions()) {
3693 auto its_definition = its_subscription->get_reliable();
3694 if (its_definition && its_definition->get_address() == _remote_address && its_definition->get_port() == _remote_port
3695 && its_definition->get_remote_port() == _local_port) {
3696
3697 VSOMEIP_INFO_P << "Removing subscription to [" << hex4(its_info->get_service()) << "." << hex4(its_info->get_instance())
3698 << "." << hex4(its_info->get_eventgroup()) << "] from target " << its_definition->get_address() << ":"
3699 << its_definition->get_port() << " reliable=true";
3700
3701 on_remote_unsubscribe(its_subscription);
3702 }
3703 }
3704 }
3705 }
3706}
3707
3708std::shared_ptr<local_endpoint> routing_manager_impl::find_routing_endpoint(client_t _client) const {
3709 return ep_mgr_impl_->find_routing_endpoint(_client);

Callers 1

~connectionMethod · 0.45

Calls 9

hex4Function · 0.85
get_reliableMethod · 0.80
get_addressMethod · 0.45
get_portMethod · 0.45
get_remote_portMethod · 0.45
get_serviceMethod · 0.45
get_instanceMethod · 0.45
get_eventgroupMethod · 0.45

Tested by

no test coverage detected