From: Francis Dupont Date: Thu, 21 May 2020 10:34:55 +0000 (+0200) Subject: [#1147] Regenerated messages and addressed comments X-Git-Tag: Kea-1.7.9~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40eda92df22a712ad14376569fe7ea1d44ea49a2;p=thirdparty%2Fkea.git [#1147] Regenerated messages and addressed comments --- diff --git a/src/bin/dhcp4/dhcp4_messages.cc b/src/bin/dhcp4/dhcp4_messages.cc index c8eb93b809..4cb92e015b 100644 --- a/src/bin/dhcp4/dhcp4_messages.cc +++ b/src/bin/dhcp4/dhcp4_messages.cc @@ -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 #include @@ -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", diff --git a/src/bin/dhcp4/dhcp4_messages.h b/src/bin/dhcp4/dhcp4_messages.h index 35357a8930..68b0551971 100644 --- a/src/bin/dhcp4/dhcp4_messages.h +++ b/src/bin/dhcp4/dhcp4_messages.h @@ -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; diff --git a/src/bin/dhcp6/dhcp6_messages.cc b/src/bin/dhcp6/dhcp6_messages.cc index 18646d4683..2402b81d5c 100644 --- a/src/bin/dhcp6/dhcp6_messages.cc +++ b/src/bin/dhcp6/dhcp6_messages.cc @@ -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 #include @@ -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", diff --git a/src/bin/dhcp6/dhcp6_messages.h b/src/bin/dhcp6/dhcp6_messages.h index 1fb44f9cf8..6cd3dfdfb5 100644 --- a/src/bin/dhcp6/dhcp6_messages.h +++ b/src/bin/dhcp6/dhcp6_messages.h @@ -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; diff --git a/src/lib/util/readwrite_mutex.h b/src/lib/util/readwrite_mutex.h index 844058303d..7a4c91eadb 100644 --- a/src/lib/util/readwrite_mutex.h +++ b/src/lib/util/readwrite_mutex.h @@ -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. diff --git a/src/lib/util/thread_pool.h b/src/lib/util/thread_pool.h index fdc29ee7fe..07cc230211 100644 --- a/src/lib/util/thread_pool.h +++ b/src/lib/util/thread_pool.h @@ -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 lock(mutex_); if ((max_queue_size_ != 0) && (queue_.size() >= max_queue_size_)) { - return (false); + return (false); } queue_.push_front(item); }