]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4140] addressed review comments master
authorRazvan Becheriu <razvan@isc.org>
Wed, 1 Oct 2025 18:40:46 +0000 (21:40 +0300)
committerRazvan Becheriu <razvan@isc.org>
Wed, 1 Oct 2025 19:09:16 +0000 (22:09 +0300)
src/hooks/dhcp/ping_check/ping_channel.cc
src/hooks/dhcp/ping_check/ping_context_store.h

index 2e9e18f44987b028faab22ec2650163295c91ee5..1e495fc9588417a76bf8df3803ee47d9a74276f6 100644 (file)
@@ -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.
index 3a7664bfca51958692d5f123a67c22bbc26ecfc8..a4f63a83b7f5171d4d676951869bd6e04d97d1be 100644 (file)
@@ -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<PingContext, const TimeStamp&,
                                                   &PingContext::getNextExpiry>
             >
-        >,
-
-        // Specification of the fifth index starts here.
-        // This index sorts contexts by State.
-        boost::multi_index::ordered_non_unique<
-            boost::multi_index::tag<StateIndexTag>,
-            boost::multi_index::const_mem_fun<PingContext, PingContext::State,
-                                              &PingContext::getState>
         >
     >
 > PingContextContainer;