From: Razvan Becheriu Date: Fri, 22 Jan 2021 21:28:14 +0000 (+0200) Subject: [#1627] removed mutex in derived classes X-Git-Tag: Kea-1.9.4~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a8041fded5957b71f6ae550cf01d613d7c51ce2;p=thirdparty%2Fkea.git [#1627] removed mutex in derived classes --- diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index cb03dae9c9..8149ccdef0 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -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); diff --git a/src/hooks/dhcp/high_availability/communication_state.cc b/src/hooks/dhcp/high_availability/communication_state.cc index 9989dffa24..711cccd9cc 100644 --- a/src/hooks/dhcp/high_availability/communication_state.cc +++ b/src/hooks/dhcp/high_availability/communication_state.cc @@ -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 diff --git a/src/hooks/dhcp/high_availability/communication_state.h b/src/hooks/dhcp/high_availability/communication_state.h index 43445eaee5..7f686f4274 100644 --- a/src/hooks/dhcp/high_availability/communication_state.h +++ b/src/hooks/dhcp/high_availability/communication_state.h @@ -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 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 mutex_; }; /// @brief Pointer to the @c CommunicationState6 object. diff --git a/src/hooks/dhcp/high_availability/ha_callouts.cc b/src/hooks/dhcp/high_availability/ha_callouts.cc index 4c3d801dc4..81d204ee5a 100644 --- a/src/hooks/dhcp/high_availability/ha_callouts.cc +++ b/src/hooks/dhcp/high_availability/ha_callouts.cc @@ -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. diff --git a/src/hooks/dhcp/high_availability/tests/ha_service_unittest.cc b/src/hooks/dhcp/high_availability/tests/ha_service_unittest.cc index 0d98836900..6743438faa 100644 --- a/src/hooks/dhcp/high_availability/tests/ha_service_unittest.cc +++ b/src/hooks/dhcp/high_availability/tests/ha_service_unittest.cc @@ -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.