From: Razvan Becheriu Date: Wed, 1 Oct 2025 18:40:46 +0000 (+0300) Subject: [#4140] addressed review comments X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=HEAD;p=thirdparty%2Fkea.git [#4140] addressed review comments --- diff --git a/src/hooks/dhcp/ping_check/ping_channel.cc b/src/hooks/dhcp/ping_check/ping_channel.cc index 2e9e18f449..1e495fc958 100644 --- a/src/hooks/dhcp/ping_check/ping_channel.cc +++ b/src/hooks/dhcp/ping_check/ping_channel.cc @@ -320,7 +320,8 @@ PingChannel::sendNext() { // with this mutex locked. MultiThreadingLock send_lock(*send_mutex_); - // Fetch the next one to send (outside the mutex). + // Fetch the next one to send (outside the mutex) to avoid a possible + // deadlock with the mutex in the @ref PingCheckMgr::nextToSend callback. PingContextPtr context = ((next_to_send_cb_)()); if (!context) { // Nothing to send. diff --git a/src/hooks/dhcp/ping_check/ping_context_store.h b/src/hooks/dhcp/ping_check/ping_context_store.h index 3a7664bfca..a4f63a83b7 100644 --- a/src/hooks/dhcp/ping_check/ping_context_store.h +++ b/src/hooks/dhcp/ping_check/ping_context_store.h @@ -43,9 +43,6 @@ struct NextToSendIndexTag { }; /// @brief Tag for index by expiration time. struct ExpirationIndexTag { }; -/// @brief Tag for index by state. -struct StateIndexTag { }; - /// @brief A multi index container holding pointers to PingContexts. /// /// The contexts in the container may be accessed using different indexes: @@ -108,14 +105,6 @@ typedef boost::multi_index_container< boost::multi_index::const_mem_fun > - >, - - // Specification of the fifth index starts here. - // This index sorts contexts by State. - boost::multi_index::ordered_non_unique< - boost::multi_index::tag, - boost::multi_index::const_mem_fun > > > PingContextContainer;