summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcp_ddns
diff options
context:
space:
mode:
authorRazvan Becheriu <razvan@isc.org>2023-10-30 21:16:08 +0100
committerRazvan Becheriu <razvan@isc.org>2023-12-11 08:52:05 +0100
commit9ecab51d37c79f3078c678e5131d19f08aa334bc (patch)
treedff34de1e2454db9726d8d896bc91cdcd1eb3d8d /src/lib/dhcp_ddns
parent[#3112] catch all exception when running IOService run, run_one and poll (diff)
downloadkea-9ecab51d37c79f3078c678e5131d19f08aa334bc.tar.xz
kea-9ecab51d37c79f3078c678e5131d19f08aa334bc.zip
[#3112] renamed run_one and get_io_service to camelCase
Diffstat (limited to 'src/lib/dhcp_ddns')
-rw-r--r--src/lib/dhcp_ddns/ncr_io.cc2
-rw-r--r--src/lib/dhcp_ddns/ncr_udp.cc4
-rw-r--r--src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc20
3 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/dhcp_ddns/ncr_io.cc b/src/lib/dhcp_ddns/ncr_io.cc
index 220fb3b224..6966b9e100 100644
--- a/src/lib/dhcp_ddns/ncr_io.cc
+++ b/src/lib/dhcp_ddns/ncr_io.cc
@@ -492,7 +492,7 @@ NameChangeSender::runReadyIO() {
// By running poll we're guaranteed not to hang.
/// @todo Trac# 3325 requests that asiolink::IOService provide a
/// wrapper for poll().
- io_service_->get_io_service().poll_one();
+ io_service_->getIOService().poll_one();
}
} // namespace dhcp_ddns
diff --git a/src/lib/dhcp_ddns/ncr_udp.cc b/src/lib/dhcp_ddns/ncr_udp.cc
index ae377934b6..59a57d0d0d 100644
--- a/src/lib/dhcp_ddns/ncr_udp.cc
+++ b/src/lib/dhcp_ddns/ncr_udp.cc
@@ -93,7 +93,7 @@ NameChangeUDPListener::open(isc::asiolink::IOService& io_service) {
// Create the low level socket.
try {
asio_socket_.reset(new boost::asio::ip::udp::
- socket(io_service.get_io_service(),
+ socket(io_service.getIOService(),
(ip_address_.isV4() ? boost::asio::ip::udp::v4() :
boost::asio::ip::udp::v6())));
@@ -233,7 +233,7 @@ NameChangeUDPSender::open(isc::asiolink::IOService& io_service) {
// Create the low level socket.
try {
asio_socket_.reset(new boost::asio::ip::udp::
- socket(io_service.get_io_service(),
+ socket(io_service.getIOService(),
(ip_address_.isV4() ? boost::asio::ip::udp::v4() :
boost::asio::ip::udp::v6())));
diff --git a/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc b/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc
index f0efa29a59..2e46dac70d 100644
--- a/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc
+++ b/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc
@@ -134,7 +134,7 @@ TEST(NameChangeUDPListenerBasicTest, basicListenTests) {
EXPECT_TRUE(listener->isIoPending());
// Verify that IO pending is false, after cancel event occurs.
- EXPECT_NO_THROW(io_service.run_one());
+ EXPECT_NO_THROW(io_service.runOne());
EXPECT_FALSE(listener->isIoPending());
// Verify that attempting to stop listening when we are not is ok.
@@ -197,7 +197,7 @@ public:
// Create a UDP socket through which our "sender" will send the NCR.
boost::asio::ip::udp::socket
- udp_socket(io_service_.get_io_service(), boost::asio::ip::udp::v4());
+ udp_socket(io_service_.getIOService(), boost::asio::ip::udp::v4());
// Create an endpoint pointed at the listener.
boost::asio::ip::udp::endpoint
@@ -252,7 +252,7 @@ TEST_F(NameChangeUDPListenerTest, basicReceiveTests) {
ASSERT_NO_THROW(sendNcr(valid_msgs[i]));
// Execute no more then one event, which should be receive complete.
- EXPECT_NO_THROW(io_service_.run_one());
+ EXPECT_NO_THROW(io_service_.runOne());
// Verify the "application" status value for a successful complete.
EXPECT_EQ(NameChangeListener::SUCCESS, result_);
@@ -268,7 +268,7 @@ TEST_F(NameChangeUDPListenerTest, basicReceiveTests) {
EXPECT_FALSE(listener_->amListening());
// Verify that IO pending is false, after cancel event occurs.
- EXPECT_NO_THROW(io_service_.run_one());
+ EXPECT_NO_THROW(io_service_.runOne());
EXPECT_FALSE(listener_->isIoPending());
}
@@ -446,7 +446,7 @@ TEST_F(NameChangeUDPSenderBasicTest, basicSendTests) {
// Loop for the number of valid messages. So long as there is at least
// on NCR in the queue, select-fd indicate ready to read. Invoke
- // IOService::run_one. This should complete the send of exactly one
+ // IOService::runOne. This should complete the send of exactly one
// message and the queue count should decrement accordingly.
for (int i = num_msgs; i > 0; i--) {
// Make sure select_fd does evaluates to ready via select and
@@ -574,7 +574,7 @@ TEST_F(NameChangeUDPSenderBasicTest, basicSendTestsMultiThreading) {
// Loop for the number of valid messages. So long as there is at least
// on NCR in the queue, select-fd indicate ready to read. Invoke
- // IOService::run_one. This should complete the send of exactly one
+ // IOService::runOne. This should complete the send of exactly one
// message and the queue count should decrement accordingly.
for (int i = num_msgs; i > 0; i--) {
// Make sure select_fd does evaluates to ready via select and
@@ -1098,7 +1098,7 @@ TEST_F(NameChangeUDPTest, roundTripTest) {
// Execute callbacks until we have sent and received all of messages.
while (sender_->getQueueSize() > 0 || (received_ncrs_.size() < num_msgs)) {
- EXPECT_NO_THROW(io_service_.run_one());
+ EXPECT_NO_THROW(io_service_.runOne());
}
// Send queue should be empty.
@@ -1116,7 +1116,7 @@ TEST_F(NameChangeUDPTest, roundTripTest) {
EXPECT_FALSE(listener_->amListening());
// Verify that IO pending is false, after cancel event occurs.
- EXPECT_NO_THROW(io_service_.run_one());
+ EXPECT_NO_THROW(io_service_.runOne());
EXPECT_FALSE(listener_->isIoPending());
// Verify that we can gracefully stop sending.
@@ -1152,7 +1152,7 @@ TEST_F(NameChangeUDPTest, roundTripTestMultiThreading) {
// Execute callbacks until we have sent and received all of messages.
while (sender_->getQueueSize() > 0 || (received_ncrs_.size() < num_msgs)) {
- EXPECT_NO_THROW(io_service_.run_one());
+ EXPECT_NO_THROW(io_service_.runOne());
}
// Send queue should be empty.
@@ -1171,7 +1171,7 @@ TEST_F(NameChangeUDPTest, roundTripTestMultiThreading) {
EXPECT_FALSE(listener_->amListening());
// Verify that IO pending is false, after cancel event occurs.
- EXPECT_NO_THROW(io_service_.run_one());
+ EXPECT_NO_THROW(io_service_.runOne());
EXPECT_FALSE(listener_->isIoPending());
// Verify that we can gracefully stop sending.