]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#899] fixed log messages
authorRazvan Becheriu <razvan@isc.org>
Wed, 17 Feb 2021 06:26:07 +0000 (08:26 +0200)
committerRazvan Becheriu <razvan@isc.org>
Thu, 18 Feb 2021 17:23:57 +0000 (19:23 +0200)
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_messages.mes
src/bin/dhcp6/dhcp6_srv.cc
src/lib/asiolink/process_spawn.cc

index c764b9f44bf24d3e5e93f66c47fce38073f059b1..b2f9866946304ba9d75c9bd0b863ddd1b8e6802a 100644 (file)
@@ -39,12 +39,11 @@ buffer holding the DHCPv4 message. The arguments specify the source and
 destination IPv4 addresses as well as the interface over which the buffer has
 been received.
 
-% DHCP4_BUFFER_WAIT_SIGNAL signal received while waiting for next packet, next waiting signal is %1
+% DHCP4_BUFFER_WAIT_SIGNAL signal received while waiting for next packet
 This debug message is issued when the server was waiting for the
 packet, but the wait has been interrupted by the signal received
 by the process. The signal will be handled before the server starts
-waiting for next packets. The argument specifies the next signal to
-be handled by the server.
+waiting for next packets.
 
 % DHCP4_CB_ON_DEMAND_FETCH_UPDATES_FAIL error on demand attempt to fetch configuration updates from the configuration backend(s): %1
 This error message is issued when the server attempted to fetch
index 15ad3325fd01ee2c878269036d45a704c84b5652..201f8d65683dde3986e3ff7c2a4d4b89129ea007 100644 (file)
@@ -990,6 +990,12 @@ Dhcpv4Srv::run_one() {
         // second.
 
     } catch (const SignalInterruptOnSelect&) {
+        // Packet reception interrupted because a signal has been received.
+        // This is not an error because we might have received a SIGTERM,
+        // SIGINT, SIGHUP or SIGCHLD which are handled by the server. For
+        // signals that are not handled by the server we rely on the default
+        // behavior of the system.
+        LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_BUFFER_WAIT_SIGNAL);
     } catch (const std::exception& e) {
         // Log all other errors.
         LOG_ERROR(packet4_logger, DHCP4_BUFFER_RECEIVE_FAIL).arg(e.what());
index 2ae9dff301b19481d488fcb8af50e6e864aa367c..3b37ecf9d45006e0b514ccc4a974134a5eaf6cfd 100644 (file)
@@ -46,12 +46,11 @@ buffer holding the DHCPv6 message. The arguments specify the source and
 destination addresses as well as the interface over which the buffer has
 been received.
 
-% DHCP6_BUFFER_WAIT_SIGNAL signal received while waiting for next packet, next waiting signal is %1
+% DHCP6_BUFFER_WAIT_SIGNAL signal received while waiting for next packet
 This debug message is issued when the server was waiting for the
 packet, but the wait has been interrupted by the signal received
 by the process. The signal will be handled before the server starts
-waiting for next packets. The argument specifies the next signal to
-be handled by the server.
+waiting for next packets.
 
 % DHCP6_CB_ON_DEMAND_FETCH_UPDATES_FAIL error on demand attempt to fetch configuration updates from the configuration backend(s): %1
 This error message is issued when the server attempted to fetch
index e0f984349bd6172519ffaab25ee08e5ef93e4b21..40a81ef5f97bd9cb5922266a8c60e2d2d231f0fe 100644 (file)
@@ -574,6 +574,12 @@ void Dhcpv6Srv::run_one() {
         // second.
 
     } catch (const SignalInterruptOnSelect&) {
+        // Packet reception interrupted because a signal has been received.
+        // This is not an error because we might have received a SIGTERM,
+        // SIGINT or SIGHUP which are handled by the server. For signals
+        // that are not handled by the server we rely on the default
+        // behavior of the system.
+        LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_WAIT_SIGNAL);
     } catch (const std::exception& e) {
         LOG_ERROR(packet6_logger, DHCP6_PACKET_RECEIVE_FAIL).arg(e.what());
     }
index 50c9654a0be3c199916749f10707be563ad283de..05854c885cc06376d50ad39672a06c6a7ea26db7 100644 (file)
@@ -45,7 +45,7 @@ typedef std::map<pid_t, ProcessState> ProcessStates;
 
 /// @brief Implementation of the @c ProcessSpawn class.
 ///
-/// This impl idiom is used by the @c ProcessSpawn in this case to
+/// This pimpl idiom is used by the @c ProcessSpawn in this case to
 /// avoid exposing the internals of the implementation, such as
 /// custom handling of a SIGCHLD signal, and the conversion of the
 /// arguments of the executable from the STL container to the array.