| 2092 | } |
| 2093 | |
| 2094 | void routing_manager_impl::on_remote_unsubscribe(std::shared_ptr<remote_subscription>& _subscription) { |
| 2095 | std::shared_ptr<eventgroupinfo> its_info = _subscription->get_eventgroupinfo(); |
| 2096 | if (!its_info) { |
| 2097 | VSOMEIP_ERROR_P << "Received Unsubscribe for unregistered eventgroup."; |
| 2098 | return; |
| 2099 | } |
| 2100 | |
| 2101 | const auto its_service = its_info->get_service(); |
| 2102 | const auto its_instance = its_info->get_instance(); |
| 2103 | const auto its_eventgroup = its_info->get_eventgroup(); |
| 2104 | const auto its_major = its_info->get_major(); |
| 2105 | |
| 2106 | // Get remote port(s) |
| 2107 | auto its_reliable = _subscription->get_reliable(); |
| 2108 | if (its_reliable) { |
| 2109 | uint16_t its_port = configuration_->get_reliable_port(its_service, its_instance); |
| 2110 | its_reliable->set_remote_port(its_port); |
| 2111 | } |
| 2112 | |
| 2113 | auto its_unreliable = _subscription->get_unreliable(); |
| 2114 | if (its_unreliable) { |
| 2115 | uint16_t its_port = configuration_->get_unreliable_port(its_service, its_instance); |
| 2116 | its_unreliable->set_remote_port(its_port); |
| 2117 | } |
| 2118 | |
| 2119 | remote_subscription_id_t its_id(0); |
| 2120 | std::set<client_t> its_removed; |
| 2121 | std::unique_lock its_update_lock{update_remote_subscription_mutex_}; |
| 2122 | auto its_result = its_info->update_remote_subscription(_subscription, std::chrono::steady_clock::now(), its_removed, its_id, false); |
| 2123 | |
| 2124 | if (its_result) { |
| 2125 | const client_t its_offering_client = find_local_client(its_service, its_instance); |
| 2126 | send_unsubscription(its_offering_client, its_service, its_instance, its_eventgroup, its_major, its_removed, its_id); |
| 2127 | } |
| 2128 | } |
| 2129 | |
| 2130 | void routing_manager_impl::on_subscribe_ack_with_multicast(service_t _service, instance_t _instance, |
| 2131 | const boost::asio::ip::address& _sender, |
no test coverage detected