| 640 | } |
| 641 | |
| 642 | void routing_manager_client::send_subscribe_ack(client_t _subscriber, service_t _service, instance_t _instance, eventgroup_t _eventgroup, |
| 643 | event_t _event, remote_subscription_id_t _id) { |
| 644 | |
| 645 | protocol::subscribe_ack_command its_command; |
| 646 | its_command.set_client(get_client()); |
| 647 | its_command.set_service(_service); |
| 648 | its_command.set_instance(_instance); |
| 649 | its_command.set_eventgroup(_eventgroup); |
| 650 | its_command.set_subscriber(_subscriber); |
| 651 | its_command.set_event(_event); |
| 652 | its_command.set_pending_id(_id); |
| 653 | |
| 654 | std::vector<byte_t> its_buffer; |
| 655 | its_command.serialize(its_buffer); |
| 656 | if (_subscriber != VSOMEIP_ROUTING_CLIENT && _id == PENDING_SUBSCRIPTION_ID) { |
| 657 | auto its_target = ep_mgr_->find_local_server_endpoint(_subscriber); |
| 658 | if (its_target) { |
| 659 | its_target->send(&its_buffer[0], uint32_t(its_buffer.size())); |
| 660 | return; |
| 661 | } else { |
| 662 | VSOMEIP_WARNING_P << "No target available to send subscription ack. Client=0x" << hex4(_subscriber) |
| 663 | << " service=" << hex4(_service) << "." << hex4(_instance) << " event=" << hex4(_event); |
| 664 | } |
| 665 | } |
| 666 | { |
| 667 | std::scoped_lock its_sender_lock{sender_mutex_}; |
| 668 | if (sender_) { |
| 669 | sender_->send(&its_buffer[0], uint32_t(its_buffer.size())); |
| 670 | } else { |
| 671 | VSOMEIP_ERROR_P << "Failed due to a missing sender"; |
| 672 | } |
| 673 | } |
| 674 | } |
| 675 | |
| 676 | void routing_manager_client::unsubscribe(client_t _client, service_t _service, instance_t _instance, eventgroup_t _eventgroup, |
| 677 | event_t _event) { |
nothing calls this directly
no test coverage detected