]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1272] replaced out-of-bandwidth with out-of-bound and added other minor doxygen...
authorRazvan Becheriu <razvan@isc.org>
Wed, 19 Aug 2020 07:47:18 +0000 (10:47 +0300)
committerRazvan Becheriu <razvan@isc.org>
Thu, 20 Aug 2020 17:26:52 +0000 (17:26 +0000)
src/hooks/dhcp/high_availability/ha_service.cc
src/hooks/dhcp/high_availability/ha_service.h
src/lib/http/client.cc
src/lib/http/client.h
src/lib/http/tests/server_client_unittests.cc

index 179518b72770badee09eaa54f26ed1d907394743..159a2cb377dca01023a869b68d2ca98c92787f03 100644 (file)
@@ -2221,7 +2221,7 @@ HAService::socketReadyHandler(int tcp_native_fd) {
     // ongoing transactions, we close it.  This will unregister it from
     // IfaceMgr and ensure the client starts over with a fresh connection
     // if it needs to do so.
-    client_.closeIfOutOfBandwidth(tcp_native_fd);
+    client_.closeIfOutOfBand(tcp_native_fd);
 }
 
 void
index 3fbf29a872be0ed3b117a5b359070c8d42c78bad..29eafcab02d3d2e94382a8d563d8a74fef88de9f 100644 (file)
@@ -875,7 +875,7 @@ protected:
     /// flagged as ready to read.   It is installed by the invocation to
     /// register the socket with IfaceMgr made in @ref clientConnectHandler.
     ///
-    /// The handler calls @c http::HttpClient::closeIfOutOfBandwidth() to catch
+    /// The handler calls @c http::HttpClient::closeIfOutOfBand() to catch
     /// and close any sockets that have gone ready outside of transactions.
     ///
     /// We do this in case the other peer closed the socket (e.g. idle timeout),
index 65dd721bd4304a5233b01ab57786ac1c86d29172..f66f4b3079700f9534cbaa5c598e790d057b9682 100644 (file)
@@ -490,7 +490,7 @@ public:
         }
     }
 
-    /// @brief Closes a connection if it has an out-of-bandwidth socket event
+    /// @brief Closes a connection if it has an out-of-band socket event
     ///
     /// If the pool contains a connection using the given socket and that
     /// connection is currently in a transaction the method returns as this
@@ -502,12 +502,12 @@ public:
     /// case is the other end of the socket being closed.
     ///
     /// @param socket_fd socket descriptor to check
-    void closeIfOutOfBandwidth(int socket_fd) {
+    void closeIfOutOfBand(int socket_fd) {
         if (MultiThreadingMgr::instance().getMode()) {
             std::lock_guard<std::mutex> lk(mutex_);
-            closeIfOutOfBandwidthInternal(socket_fd);
+            closeIfOutOfBandInternal(socket_fd);
         } else {
-            closeIfOutOfBandwidthInternal(socket_fd);
+            closeIfOutOfBandInternal(socket_fd);
         }
     }
 
@@ -624,7 +624,7 @@ private:
         queue_.clear();
     }
 
-    /// @brief Closes a connection if it has an out-of-bandwidth socket event
+    /// @brief Closes a connection if it has an out-of-band socket event
     ///
     /// If the pool contains a connection using the given socket and that
     /// connection is currently in a transaction the method returns as this
@@ -638,7 +638,7 @@ private:
     /// This method should be called in a thread safe context.
     ///
     /// @param socket_fd socket descriptor to check
-    void closeIfOutOfBandwidthInternal(int socket_fd) {
+    void closeIfOutOfBandInternal(int socket_fd) {
         // First we look for a connection with the socket.
         for (auto conns_it = conns_.begin(); conns_it != conns_.end();
              ++conns_it) {
@@ -654,7 +654,7 @@ private:
             }
 
             // Socket has no transaction, so any ready event is
-            // out-of-bandwidth (other end probably closed), so
+            // out-of-band (other end probably closed), so
             // let's close it.  Note we do not remove any queued
             // requests, as this might somehow be occurring in
             // between them.
@@ -1246,8 +1246,8 @@ HttpClient::asyncSendRequest(const Url& url, const HttpRequestPtr& request,
 }
 
 void
-HttpClient::closeIfOutOfBandwidth(int socket_fd)  {
-    return (impl_->conn_pool_->closeIfOutOfBandwidth(socket_fd));
+HttpClient::closeIfOutOfBand(int socket_fd)  {
+    return (impl_->conn_pool_->closeIfOutOfBand(socket_fd));
 }
 
 void
index 9b9aff751f200884edca45c41f4f2ed1122f96b0..b772300e47ea15ed05e012a8a36c600cc34f550b 100644 (file)
@@ -191,7 +191,7 @@ public:
     /// @brief Closes all connections.
     void stop();
 
-    /// @brief Closes a connection if it has an out-of-bandwidth socket event
+    /// @brief Closes a connection if it has an out-of-band socket event
     ///
     /// If the  client owns a connection using the given socket and that
     /// connection is currently in a transaction the method returns as this
@@ -199,11 +199,11 @@ public:
     /// ongoing transaction, then the connection is closed.
     ///
     /// This is method is intended to be used to detect and clean up then
-    /// sockets that are marked ready outside of transactions. The most comman
+    /// sockets that are marked ready outside of transactions. The most common
     /// case is the other end of the socket being closed.
     ///
     /// @param socket_fd socket descriptor to check
-    void closeIfOutOfBandwidth(int socket_fd);
+    void closeIfOutOfBand(int socket_fd);
 
 private:
 
index 12c7e4c6c8ce819754732f3cd85a44a00f14f2cc..fa91b150de93ad2dc1eda277832e14fc92934e19 100644 (file)
@@ -1739,20 +1739,20 @@ public:
         EXPECT_EQ(-1, monitor.registered_fd_);
     }
 
-    /// @brief Tests detection and handling out-of-bandwidth socket events
+    /// @brief Tests detection and handling out-of-band socket events
     ///
-    /// It initiates a transacation and verifies that a mid-transacation call
-    /// to HttpClient::closeIfOutOfBandwidth() has no affect on the connection.
-    /// After succesful completion of the transaction, a second call is made
-    /// HttpClient::closeIfOutOfBandwidth().  This should result in the connection
-    /// being closed.
+    /// It initiates a transaction and verifies that a mid-transaction call
+    /// to HttpClient::closeIfOutOfBand() has no affect on the connection.
+    /// After successful completion of the transaction, a second call to
+    /// HttpClient::closeIfOutOfBand() is made. This should result in the
+    /// connection being closed.
     /// This step is repeated to verify that after an OOB closure, transactions
     /// to the same destination can be processed.
     ///
     /// Lastly, we verify that HttpClient::stop() closes the connection correctly.
     ///
     /// @param version HTTP version to be used.
-    void testCloseIfOutOfBandwidth(const HttpVersion& version) {
+    void testCloseIfOutOfBand(const HttpVersion& version) {
         // Start the server.
         ASSERT_NO_THROW(listener_.start());
 
@@ -1780,7 +1780,7 @@ public:
             int orig_fd = monitor.registered_fd_;
 
             // Test our socket for OOBness.
-            client.closeIfOutOfBandwidth(monitor.registered_fd_);
+            client.closeIfOutOfBand(monitor.registered_fd_);
 
             // Since we're in a transaction, we should have no closes and
             // the same valid fd.
@@ -1812,7 +1812,7 @@ public:
         EXPECT_GT(monitor.registered_fd_, -1);
 
         // Test our socket for OOBness.
-        client.closeIfOutOfBandwidth(monitor.registered_fd_);
+        client.closeIfOutOfBand(monitor.registered_fd_);
 
         // Since we're in a transaction, we should have no closes and
         // the same valid fd.
@@ -1838,7 +1838,7 @@ public:
             int orig_fd = monitor.registered_fd_;
 
             // Test our socket for OOBness.
-            client.closeIfOutOfBandwidth(monitor.registered_fd_);
+            client.closeIfOutOfBand(monitor.registered_fd_);
 
             // Since we're in a transaction, we should have no closes and
             // the same valid fd.
@@ -2080,15 +2080,15 @@ TEST_F(HttpClientTest, connectCloseCallbacksMultiThreading) {
     ASSERT_NO_FATAL_FAILURE(testConnectCloseCallbacks(HttpVersion(1, 1)));
 }
 
-/// Tests that HttpClient::closeIfOutOfBandwidth works correctly.
-TEST_F(HttpClientTest, closeIfOutOfBandwidth) {
-    ASSERT_NO_FATAL_FAILURE(testCloseIfOutOfBandwidth(HttpVersion(1, 1)));
+/// Tests that HttpClient::closeIfOutOfBand works correctly.
+TEST_F(HttpClientTest, closeIfOutOfBand) {
+    ASSERT_NO_FATAL_FAILURE(testCloseIfOutOfBand(HttpVersion(1, 1)));
 }
 
-/// Tests that HttpClient::closeIfOutOfBandwidth works correctly.
-TEST_F(HttpClientTest, closeIfOutOfBandwidthMultiThreading) {
+/// Tests that HttpClient::closeIfOutOfBand works correctly.
+TEST_F(HttpClientTest, closeIfOutOfBandMultiThreading) {
     MultiThreadingMgr::instance().setMode(true);
-    ASSERT_NO_FATAL_FAILURE(testCloseIfOutOfBandwidth(HttpVersion(1, 1)));
+    ASSERT_NO_FATAL_FAILURE(testCloseIfOutOfBand(HttpVersion(1, 1)));
 }
 
 }