| 2425 | } |
| 2426 | |
| 2427 | void routing_manager_impl::version_log_timer_cbk(boost::system::error_code const& _error, size_t _count) { |
| 2428 | if (!_error) { |
| 2429 | const uint32_t its_interval = configuration_->get_version_log_interval(host_->get_name(), true); |
| 2430 | |
| 2431 | std::stringstream its_last_resume; |
| 2432 | { |
| 2433 | std::scoped_lock its_lock(last_resume_mutex_); |
| 2434 | if (last_resume_ != std::chrono::steady_clock::time_point::min()) { |
| 2435 | its_last_resume << " | Last resume: " |
| 2436 | << std::chrono::duration_cast<std::chrono::seconds>(std::chrono::steady_clock::now() - last_resume_).count() |
| 2437 | << "s ago."; |
| 2438 | } |
| 2439 | } |
| 2440 | VSOMEIP_INFO << "vSomeIP " << VSOMEIP_VERSION << " (" << VSOMEIP_GIT_COMMIT << ") " << its_last_resume.str(); |
| 2441 | |
| 2442 | ep_mgr_impl_->log_client_states(); |
| 2443 | ep_mgr_impl_->log_server_states(); |
| 2444 | |
| 2445 | if (_count % 3) { |
| 2446 | // log only external connections, UDP+TCP |
| 2447 | log_network_state(false, true); |
| 2448 | log_network_state(true, true); |
| 2449 | } else { |
| 2450 | // log all connections, UDP+TCP |
| 2451 | log_network_state(false, false); |
| 2452 | log_network_state(true, false); |
| 2453 | } |
| 2454 | |
| 2455 | { |
| 2456 | std::scoped_lock its_lock(log_timer_mutex_); |
| 2457 | version_log_timer_.expires_after(std::chrono::milliseconds(its_interval)); |
| 2458 | version_log_timer_.async_wait( |
| 2459 | [this, count = _count + 1](boost::system::error_code const& ec) { this->version_log_timer_cbk(ec, count); }); |
| 2460 | } |
| 2461 | } |
| 2462 | } |
| 2463 | |
| 2464 | bool routing_manager_impl::handle_local_offer_service(client_t _client, service_t _service, instance_t _instance, major_version_t _major, |
| 2465 | minor_version_t _minor) { |
no test coverage detected