]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1147] Regenerated messages and addressed comments
authorFrancis Dupont <fdupont@isc.org>
Thu, 21 May 2020 10:34:55 +0000 (12:34 +0200)
committerFrancis Dupont <fdupont@isc.org>
Tue, 26 May 2020 09:51:57 +0000 (11:51 +0200)
src/bin/dhcp4/dhcp4_messages.cc
src/bin/dhcp4/dhcp4_messages.h
src/bin/dhcp6/dhcp6_messages.cc
src/bin/dhcp6/dhcp6_messages.h
src/lib/util/readwrite_mutex.h
src/lib/util/thread_pool.h

index c8eb93b80945bec87dc4ef2eb693339338e802d7..4cb92e015bf7c382fbab0dad47bfd16a6f901e1d 100644 (file)
@@ -1,4 +1,4 @@
-// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Sat May 09 2020 12:24
+// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Thu May 21 2020 12:10
 
 #include <cstddef>
 #include <log/message_types.h>
@@ -50,6 +50,7 @@ extern const isc::log::MessageID DHCP4_DECLINE_LEASE_MISMATCH = "DHCP4_DECLINE_L
 extern const isc::log::MessageID DHCP4_DECLINE_LEASE_NOT_FOUND = "DHCP4_DECLINE_LEASE_NOT_FOUND";
 extern const isc::log::MessageID DHCP4_DEFERRED_OPTION_MISSING = "DHCP4_DEFERRED_OPTION_MISSING";
 extern const isc::log::MessageID DHCP4_DEFERRED_OPTION_UNPACK_FAIL = "DHCP4_DEFERRED_OPTION_UNPACK_FAIL";
+extern const isc::log::MessageID DHCP4_DEVELOPMENT_VERSION = "DHCP4_DEVELOPMENT_VERSION";
 extern const isc::log::MessageID DHCP4_DHCP4O6_BAD_PACKET = "DHCP4_DHCP4O6_BAD_PACKET";
 extern const isc::log::MessageID DHCP4_DHCP4O6_PACKET_RECEIVED = "DHCP4_DHCP4O6_PACKET_RECEIVED";
 extern const isc::log::MessageID DHCP4_DHCP4O6_PACKET_SEND = "DHCP4_DHCP4O6_PACKET_SEND";
@@ -198,6 +199,7 @@ const char* values[] = {
     "DHCP4_DECLINE_LEASE_NOT_FOUND", "Received DHCPDECLINE for addr %1 from client %2, but no such lease found.",
     "DHCP4_DEFERRED_OPTION_MISSING", "can find deferred option code %1 in the query",
     "DHCP4_DEFERRED_OPTION_UNPACK_FAIL", "An error unpacking the deferred option %1: %2",
+    "DHCP4_DEVELOPMENT_VERSION", "This software is a development branch of Kea. It is not recommended for production use.",
     "DHCP4_DHCP4O6_BAD_PACKET", "received malformed DHCPv4o6 packet: %1",
     "DHCP4_DHCP4O6_PACKET_RECEIVED", "received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 on interface %3",
     "DHCP4_DHCP4O6_PACKET_SEND", "%1: trying to send packet %2 (type %3) to %4 port %5 on interface %6 encapsulating %7: %8 (type %9)",
@@ -288,7 +290,7 @@ const char* values[] = {
     "DHCP4_SRV_D2STOP_ERROR", "error stopping IO with DHCP_DDNS during shutdown: %1",
     "DHCP4_SRV_DHCP4O6_ERROR", "error stopping IO with DHCPv4o6 during shutdown: %1",
     "DHCP4_STARTED", "Kea DHCPv4 server version %1 started",
-    "DHCP4_STARTING", "Kea DHCPv4 server version %1 starting",
+    "DHCP4_STARTING", "Kea DHCPv4 server version %1 (%2) starting",
     "DHCP4_START_INFO", "pid: %1, server port: %2, client port: %3, verbose: %4",
     "DHCP4_SUBNET_DATA", "%1: the selected subnet details: %2",
     "DHCP4_SUBNET_DYNAMICALLY_CHANGED", "%1: changed selected subnet %2 to subnet %3 from shared network %4 for client assignments",
index 35357a8930005f359eeb52f72539a1acd581f1cc..68b05519719635d06c49dba03e6e80c2606f1499 100644 (file)
@@ -1,4 +1,4 @@
-// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Sat May 09 2020 12:24
+// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Thu May 21 2020 12:10
 
 #ifndef DHCP4_MESSAGES_H
 #define DHCP4_MESSAGES_H
@@ -51,6 +51,7 @@ extern const isc::log::MessageID DHCP4_DECLINE_LEASE_MISMATCH;
 extern const isc::log::MessageID DHCP4_DECLINE_LEASE_NOT_FOUND;
 extern const isc::log::MessageID DHCP4_DEFERRED_OPTION_MISSING;
 extern const isc::log::MessageID DHCP4_DEFERRED_OPTION_UNPACK_FAIL;
+extern const isc::log::MessageID DHCP4_DEVELOPMENT_VERSION;
 extern const isc::log::MessageID DHCP4_DHCP4O6_BAD_PACKET;
 extern const isc::log::MessageID DHCP4_DHCP4O6_PACKET_RECEIVED;
 extern const isc::log::MessageID DHCP4_DHCP4O6_PACKET_SEND;
index 18646d468379706bbba29a65f280532c8e2c66ea..2402b81d5c62832a6c0da632c3abf9c677cd4d9b 100644 (file)
@@ -1,4 +1,4 @@
-// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Sat May 09 2020 12:13
+// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu May 21 2020 12:11
 
 #include <cstddef>
 #include <log/message_types.h>
@@ -51,6 +51,7 @@ extern const isc::log::MessageID DHCP6_DECLINE_FAIL_LEASE_WITHOUT_DUID = "DHCP6_
 extern const isc::log::MessageID DHCP6_DECLINE_FAIL_NO_LEASE = "DHCP6_DECLINE_FAIL_NO_LEASE";
 extern const isc::log::MessageID DHCP6_DECLINE_LEASE = "DHCP6_DECLINE_LEASE";
 extern const isc::log::MessageID DHCP6_DECLINE_PROCESS_IA = "DHCP6_DECLINE_PROCESS_IA";
+extern const isc::log::MessageID DHCP6_DEVELOPMENT_VERSION = "DHCP6_DEVELOPMENT_VERSION";
 extern const isc::log::MessageID DHCP6_DHCP4O6_PACKET_RECEIVED = "DHCP6_DHCP4O6_PACKET_RECEIVED";
 extern const isc::log::MessageID DHCP6_DHCP4O6_RECEIVE_FAIL = "DHCP6_DHCP4O6_RECEIVE_FAIL";
 extern const isc::log::MessageID DHCP6_DHCP4O6_RECEIVING = "DHCP6_DHCP4O6_RECEIVING";
@@ -199,6 +200,7 @@ const char* values[] = {
     "DHCP6_DECLINE_FAIL_NO_LEASE", "Client %1 sent DECLINE for address %2, but there's no lease for it",
     "DHCP6_DECLINE_LEASE", "Client %1 sent DECLINE for address %2 and the server marked it as declined. The lease will be recovered in %3 seconds.",
     "DHCP6_DECLINE_PROCESS_IA", "Processing of IA (IAID: %1) from client %2 started.",
+    "DHCP6_DEVELOPMENT_VERSION", "This software is a development branch of Kea. It is not recommended for production use.",
     "DHCP6_DHCP4O6_PACKET_RECEIVED", "received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 port %3 on interface %4",
     "DHCP6_DHCP4O6_RECEIVE_FAIL", "failed to receive DHCPv4o6: %1",
     "DHCP6_DHCP4O6_RECEIVING", "receiving DHCPv4o6 packet from DHCPv4 server",
@@ -288,7 +290,7 @@ const char* values[] = {
     "DHCP6_SRV_D2STOP_ERROR", "error stopping IO with DHCP_DDNS during shutdown: %1",
     "DHCP6_STANDALONE", "skipping message queue, running standalone",
     "DHCP6_STARTED", "Kea DHCPv6 server version %1 started",
-    "DHCP6_STARTING", "Kea DHCPv6 server version %1 starting",
+    "DHCP6_STARTING", "Kea DHCPv6 server version %1 (%2) starting",
     "DHCP6_START_INFO", "pid: %1, server port: %2, client port: %3, verbose: %4",
     "DHCP6_SUBNET_DATA", "%1: the selected subnet details: %2",
     "DHCP6_SUBNET_DYNAMICALLY_CHANGED", "%1: changed selected subnet %2 to subnet %3 from shared network %4 for client assignments",
index 1fb44f9cf8024d6f0699e17f67bf48c7f0d6012b..6cd3dfdfb598d7da3fa173d268c9423e642d2216 100644 (file)
@@ -1,4 +1,4 @@
-// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Sat May 09 2020 12:13
+// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu May 21 2020 12:11
 
 #ifndef DHCP6_MESSAGES_H
 #define DHCP6_MESSAGES_H
@@ -52,6 +52,7 @@ extern const isc::log::MessageID DHCP6_DECLINE_FAIL_LEASE_WITHOUT_DUID;
 extern const isc::log::MessageID DHCP6_DECLINE_FAIL_NO_LEASE;
 extern const isc::log::MessageID DHCP6_DECLINE_LEASE;
 extern const isc::log::MessageID DHCP6_DECLINE_PROCESS_IA;
+extern const isc::log::MessageID DHCP6_DEVELOPMENT_VERSION;
 extern const isc::log::MessageID DHCP6_DHCP4O6_PACKET_RECEIVED;
 extern const isc::log::MessageID DHCP6_DHCP4O6_RECEIVE_FAIL;
 extern const isc::log::MessageID DHCP6_DHCP4O6_RECEIVING;
index 844058303ded641fd3615a41c4ae8750c7b0c539..7a4c91eadb861306ce314a86800086abdce6cf71 100644 (file)
@@ -35,7 +35,7 @@ public:
     static const unsigned WRITE_ENTERED =
         1U << (sizeof(unsigned) * CHAR_BIT - 1);
 
-    /// @brief The maximum number of readers (flag complement so 2^30 - 1).
+    /// @brief The maximum number of readers (flag complement so 2^31 - 1).
     static const unsigned MAX_READERS = ~WRITE_ENTERED;
 
     /// @brief Constructor.
index fdc29ee7fedcceda231bb7f1f9eccd683de7c4b6..07cc230211a654c134e1d25dfb73e6d0c6531843 100644 (file)
@@ -81,7 +81,7 @@ struct ThreadPool {
     /// @return false if the queue was full and oldest item(s) was dropped,
     /// true otherwise.
     bool add(const WorkItemPtr& item) {
-        return (queue_.push_back(item));
+        return (queue_.pushBack(item));
     }
 
     /// @brief add a work item to the thread pool at front
@@ -89,7 +89,7 @@ struct ThreadPool {
     /// @param item the 'functor' object to be added to the queue
     /// @return false if the queue was full, true otherwise.
     bool addFront(const WorkItemPtr& item) {
-        return (queue_.push_front(item));
+        return (queue_.pushFront(item));
     }
 
     /// @brief count number of work items in the queue
@@ -211,7 +211,7 @@ private:
         /// @param item the new item to be added to the queue
         /// @return false if the queue was full and oldest item(s) dropped,
         /// true otherwise
-        bool push_back(const Item& item) {
+        bool pushBack(const Item& item) {
             bool ret = true;
             if (!item) {
                 return (ret);
@@ -238,7 +238,7 @@ private:
         ///
         /// @param item the new item to be added to the queue
         /// @return false if the queue was full, true otherwise
-        bool push_front(const Item& item) {
+        bool pushFront(const Item& item) {
             if (!item) {
                 return (true);
             }
@@ -246,7 +246,7 @@ private:
                 std::lock_guard<std::mutex> lock(mutex_);
                 if ((max_queue_size_ != 0) &&
                     (queue_.size() >= max_queue_size_)) {
-                        return (false);
+                    return (false);
                 }
                 queue_.push_front(item);
             }