| 606 | } |
| 607 | |
| 608 | void routing_manager_client::send_subscribe_nack(client_t _subscriber, service_t _service, instance_t _instance, eventgroup_t _eventgroup, |
| 609 | event_t _event, remote_subscription_id_t _id) { |
| 610 | |
| 611 | protocol::subscribe_nack_command its_command; |
| 612 | its_command.set_client(get_client()); |
| 613 | its_command.set_service(_service); |
| 614 | its_command.set_instance(_instance); |
| 615 | its_command.set_eventgroup(_eventgroup); |
| 616 | its_command.set_subscriber(_subscriber); |
| 617 | its_command.set_event(_event); |
| 618 | its_command.set_pending_id(_id); |
| 619 | |
| 620 | std::vector<byte_t> its_buffer; |
| 621 | its_command.serialize(its_buffer); |
| 622 | if (_subscriber != VSOMEIP_ROUTING_CLIENT && _id == PENDING_SUBSCRIPTION_ID) { |
| 623 | auto its_target = ep_mgr_->find_local_server_endpoint(_subscriber); |
| 624 | if (its_target) { |
| 625 | its_target->send(&its_buffer[0], uint32_t(its_buffer.size())); |
| 626 | return; |
| 627 | } else { |
| 628 | VSOMEIP_WARNING_P << "No target available to send subscription nack. Client=0x" << hex4(_subscriber) |
| 629 | << " service=" << hex4(_service) << "." << hex4(_instance) << " event=" << hex4(_event); |
| 630 | } |
| 631 | } |
| 632 | { |
| 633 | std::scoped_lock its_sender_lock{sender_mutex_}; |
| 634 | if (sender_) { |
| 635 | sender_->send(&its_buffer[0], uint32_t(its_buffer.size())); |
| 636 | } else { |
| 637 | VSOMEIP_ERROR_P << "Failed due to a missing sender"; |
| 638 | } |
| 639 | } |
| 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) { |
nothing calls this directly
no test coverage detected