]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1627] removed mutex in derived classes
authorRazvan Becheriu <razvan@isc.org>
Fri, 22 Jan 2021 21:28:14 +0000 (23:28 +0200)
committerRazvan Becheriu <razvan@isc.org>
Mon, 25 Jan 2021 11:38:21 +0000 (11:38 +0000)
src/bin/dhcp6/dhcp6_srv.cc
src/hooks/dhcp/high_availability/communication_state.cc
src/hooks/dhcp/high_availability/communication_state.h
src/hooks/dhcp/high_availability/ha_callouts.cc
src/hooks/dhcp/high_availability/tests/ha_service_unittest.cc

index cb03dae9c92e3c3851c6148efbc142edb69fbc0f..8149ccdef0f7c029b6aa80b126dc2175d8782eed 100644 (file)
@@ -396,7 +396,7 @@ Dhcpv6Srv::initContext(const Pkt6Ptr& pkt,
             case Host::IDENT_FLEX:
                 // At this point the information in the packet has been unpacked into
                 // the various packet fields and option objects has been created.
-                // Execute callouts registered for packet6_receive.
+                // Execute callouts registered for host6_identifier.
                 if (HooksManager::calloutsPresent(Hooks.hook_index_host6_identifier_)) {
                     CalloutHandlePtr callout_handle = getCalloutHandle(pkt);
 
index 9989dffa249d98a6b9e66a3c9b40ab3409d34a44..711cccd9cc2e4135440647baeb3458b35cbb779a 100644 (file)
@@ -368,8 +368,7 @@ CommunicationState::getReport() const {
 
 CommunicationState4::CommunicationState4(const IOServicePtr& io_service,
                                          const HAConfigPtr& config)
-    : CommunicationState(io_service, config), connecting_clients_(),
-      mutex_(new mutex()) {
+    : CommunicationState(io_service, config), connecting_clients_() {
 }
 
 void
@@ -512,8 +511,7 @@ CommunicationState4::clearConnectingClients() {
 
 CommunicationState6::CommunicationState6(const IOServicePtr& io_service,
                                          const HAConfigPtr& config)
-    : CommunicationState(io_service, config), connecting_clients_(),
-      mutex_(new mutex()) {
+    : CommunicationState(io_service, config), connecting_clients_() {
 }
 
 void
index 43445eaee55875c8777295998412315f99270f03..7f686f4274d9024e75a403cde2de224c738dae57 100644 (file)
@@ -561,9 +561,6 @@ protected:
     /// the partner server while the servers are in communications
     /// interrupted state.
     ConnectingClients4 connecting_clients_;
-
-    /// @brief The mutex used to protect internal state.
-    const boost::scoped_ptr<std::mutex> mutex_;
 };
 
 /// @brief Pointer to the @c CommunicationState4 object.
@@ -680,9 +677,6 @@ protected:
     /// the partner server while the servers are in communications
     /// interrupted state.
     ConnectingClients6 connecting_clients_;
-
-    /// @brief The mutex used to protect internal state.
-    const boost::scoped_ptr<std::mutex> mutex_;
 };
 
 /// @brief Pointer to the @c CommunicationState6 object.
index 4c3d801dc494513e9ec795fc175e5237bdae0f19..81d204ee5aa0528bf7185b2ce9d51badad8ec690 100644 (file)
@@ -279,6 +279,8 @@ int ha_reset_command(CalloutHandle& handle) {
         LOG_ERROR(ha_logger, HA_RESET_HANDLER_FAILED)
             .arg(ex.what());
     }
+
+    return (0);
 }
 
 /// @brief This function is called when the library is loaded.
index 0d988369005864e7d3a533d31b6f70efc80e71d0..6743438faabe27f67ea2745b17cbefdfae3f494d 100644 (file)
@@ -1915,7 +1915,7 @@ public:
     /// @brief Test HTTP server 2.
     HttpListenerPtr listener2_;
 
-    /// @brief Test HTTP server 2.
+    /// @brief Test HTTP server 3.
     HttpListenerPtr listener3_;
 
     /// @brief IPv4 leases to be used in the tests.