////////////////////////////////////////////////////////////////////////// PRIVATE //////////////////////////////////////////////////////////////////////////
| 1549 | // PRIVATE |
| 1550 | /////////////////////////////////////////////////////////////////////////////// |
| 1551 | void routing_manager_impl::init_service_info(service_t _service, instance_t _instance, bool _is_local_service) { |
| 1552 | std::shared_ptr<serviceinfo> its_info = find_service(_service, _instance); |
| 1553 | if (!its_info) { |
| 1554 | VSOMEIP_ERROR_P << "Couldn't find serviceinfo for service: [" << hex4(_service) << "." << hex4(_instance) |
| 1555 | << "] is_local_service=" << _is_local_service; |
| 1556 | return; |
| 1557 | } |
| 1558 | if (configuration_) { |
| 1559 | // Create server endpoints for local services only |
| 1560 | if (_is_local_service) { |
| 1561 | const bool is_someip = configuration_->is_someip(_service, _instance); |
| 1562 | uint16_t its_reliable_port = configuration_->get_reliable_port(_service, _instance); |
| 1563 | bool _is_found(false); |
| 1564 | if (ILLEGAL_PORT != its_reliable_port) { |
| 1565 | auto its_reliable_endpoint = |
| 1566 | ep_mgr_impl_->find_or_create_server_endpoint(its_reliable_port, true, is_someip, _service, _instance, _is_found); |
| 1567 | if (its_reliable_endpoint) { |
| 1568 | its_info->set_endpoint(its_reliable_endpoint, true); |
| 1569 | } |
| 1570 | } |
| 1571 | uint16_t its_unreliable_port = configuration_->get_unreliable_port(_service, _instance); |
| 1572 | if (ILLEGAL_PORT != its_unreliable_port) { |
| 1573 | auto its_unreliable_endpoint = |
| 1574 | ep_mgr_impl_->find_or_create_server_endpoint(its_unreliable_port, false, is_someip, _service, _instance, _is_found); |
| 1575 | if (its_unreliable_endpoint) { |
| 1576 | its_info->set_endpoint(its_unreliable_endpoint, false); |
| 1577 | } |
| 1578 | } |
| 1579 | |
| 1580 | if (ILLEGAL_PORT == its_reliable_port && ILLEGAL_PORT == its_unreliable_port) { |
| 1581 | VSOMEIP_INFO << "Port configuration missing for [" << hex4(_service) << "." << hex4(_instance) << "]. Service is internal."; |
| 1582 | } |
| 1583 | its_info->set_is_in_preparation(false); |
| 1584 | } |
| 1585 | } else { |
| 1586 | VSOMEIP_ERROR << "Missing vsomeip configuration."; |
| 1587 | } |
| 1588 | } |
| 1589 | |
| 1590 | void routing_manager_impl::remove_local(client_t _client) { |
| 1591 |
nothing calls this directly
no test coverage detected