From 9ecab51d37c79f3078c678e5131d19f08aa334bc Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Mon, 30 Oct 2023 22:16:08 +0200 Subject: [#3112] renamed run_one and get_io_service to camelCase --- src/bin/agent/ca_process.cc | 8 ++++---- src/bin/agent/tests/ca_command_mgr_unittests.cc | 4 ++-- src/bin/agent/tests/ca_process_unittests.cc | 2 +- src/bin/d2/d2_process.cc | 16 +++++++--------- src/bin/d2/tests/d2_process_unittests.cc | 4 ++-- src/bin/d2/tests/d2_queue_mgr_unittests.cc | 20 ++++++++++---------- src/bin/dhcp4/dhcp4_lexer.cc | 12 ++++++------ src/bin/dhcp4/dhcp4_srv.cc | 6 +++--- src/bin/dhcp4/dhcp4_srv.h | 2 +- src/bin/dhcp4/dhcp4to6_ipc.cc | 4 ++-- src/bin/dhcp4/tests/dhcp4_client.cc | 4 ++-- src/bin/dhcp4/tests/kea_controller_unittest.cc | 4 ++-- src/bin/dhcp6/dhcp6_srv.cc | 10 ++++++---- src/bin/dhcp6/dhcp6_srv.h | 2 +- src/bin/dhcp6/tests/dhcp6_client.cc | 4 ++-- src/bin/dhcp6/tests/kea_controller_unittest.cc | 4 ++-- src/bin/netconf/netconf_process.cc | 4 ++-- src/bin/netconf/tests/control_socket_unittests.cc | 16 ++++++++-------- src/bin/netconf/tests/netconf_process_unittests.cc | 2 +- src/bin/netconf/tests/netconf_unittests.cc | 10 +++++----- 20 files changed, 69 insertions(+), 69 deletions(-) (limited to 'src/bin') diff --git a/src/bin/agent/ca_process.cc b/src/bin/agent/ca_process.cc index 0bc8d68a37..9e6665ff98 100644 --- a/src/bin/agent/ca_process.cc +++ b/src/bin/agent/ca_process.cc @@ -88,9 +88,9 @@ CtrlAgentProcess::run() { size_t CtrlAgentProcess::runIO() { - size_t cnt = getIoService()->get_io_service().poll(); + size_t cnt = getIOService()->getIOService().poll(); if (!cnt) { - cnt = getIoService()->get_io_service().run_one(); + cnt = getIOService()->getIOService().run_one(); } return (cnt); } @@ -164,7 +164,7 @@ CtrlAgentProcess::configure(isc::data::ConstElementPtr config_set, // Create http listener. It will open up a TCP socket and be // prepared to accept incoming connection. HttpListenerPtr http_listener - (new HttpListener(*getIoService(), server_address, + (new HttpListener(*getIOService(), server_address, server_port, tls_context, rcf, HttpListener::RequestTimeout(TIMEOUT_AGENT_RECEIVE_COMMAND), HttpListener::IdleTimeout(TIMEOUT_AGENT_IDLE_CONNECTION_TIMEOUT))); @@ -208,7 +208,7 @@ CtrlAgentProcess::garbageCollectListeners(size_t leaving) { } // We have stopped listeners but there may be some pending handlers // related to these listeners. Need to invoke these handlers. - getIoService()->get_io_service().poll(); + getIOService()->getIOService().poll(); // Finally, we're ready to remove no longer used listeners. http_listeners_.erase(http_listeners_.begin(), http_listeners_.end() - leaving); diff --git a/src/bin/agent/tests/ca_command_mgr_unittests.cc b/src/bin/agent/tests/ca_command_mgr_unittests.cc index 6353916be1..275961bd69 100644 --- a/src/bin/agent/tests/ca_command_mgr_unittests.cc +++ b/src/bin/agent/tests/ca_command_mgr_unittests.cc @@ -248,7 +248,7 @@ public: // We have some cancelled operations for which we need to invoke the // handlers with the operation_aborted error code. - getIOService()->get_io_service().reset(); + getIOService()->getIOService().reset(); getIOService()->poll(); EXPECT_EQ(expected_responses, server_socket_->getResponseNum()); @@ -413,7 +413,7 @@ TEST_F(CtrlAgentCommandMgrTest, forwardListCommands) { // We have some cancelled operations for which we need to invoke the // handlers with the operation_aborted error code. - getIOService()->get_io_service().reset(); + getIOService()->getIOService().reset(); getIOService()->poll(); // Answer of 3 is specific to the stub response we send when the diff --git a/src/bin/agent/tests/ca_process_unittests.cc b/src/bin/agent/tests/ca_process_unittests.cc index 37e06f66ed..6f9bd12d97 100644 --- a/src/bin/agent/tests/ca_process_unittests.cc +++ b/src/bin/agent/tests/ca_process_unittests.cc @@ -67,7 +67,7 @@ TEST(CtrlAgentProcess, construction) { TEST_F(CtrlAgentProcessTest, shutdown) { // Use an asiolink IntervalTimer and callback to generate the // shutdown invocation. (Note IntervalTimer setup is in milliseconds). - IntervalTimer timer(*getIoService()); + IntervalTimer timer(*getIOService()); timer.setup(std::bind(&CtrlAgentProcessTest::genShutdownCallback, this), 200); diff --git a/src/bin/d2/d2_process.cc b/src/bin/d2/d2_process.cc index 2eef4a3371..5cfcda6422 100644 --- a/src/bin/d2/d2_process.cc +++ b/src/bin/d2/d2_process.cc @@ -58,13 +58,13 @@ D2Process::D2Process(const char* name, const asiolink::IOServicePtr& io_service) // been received. This means that until we receive the configuration, // D2 will neither receive nor process NameChangeRequests. // Pass in IOService for NCR IO event processing. - queue_mgr_.reset(new D2QueueMgr(getIoService())); + queue_mgr_.reset(new D2QueueMgr(getIOService())); // Instantiate update manager. // Pass in both queue manager and configuration manager. // Pass in IOService for DNS update transaction IO event processing. D2CfgMgrPtr tmp = getD2CfgMgr(); - update_mgr_.reset(new D2UpdateMgr(queue_mgr_, tmp, getIoService())); + update_mgr_.reset(new D2UpdateMgr(queue_mgr_, tmp, getIOService())); // Initialize stats manager. D2Stats::init(); @@ -73,7 +73,7 @@ D2Process::D2Process(const char* name, const asiolink::IOServicePtr& io_service) void D2Process::init() { // CommandMgr uses IO service to run asynchronous socket operations. - isc::config::CommandMgr::instance().setIOService(getIoService()); + isc::config::CommandMgr::instance().setIOService(getIOService()); }; void @@ -131,24 +131,22 @@ size_t D2Process::runIO() { // We want to block until at least one handler is called. We'll use // boost::asio::io_service directly for two reasons. First off - // asiolink::IOService::run_one is a void and boost::asio::io_service::stopped + // asiolink::IOService::runOne is a void and boost::asio::io_service::stopped // is not present in older versions of boost. We need to know if any // handlers ran or if the io_service was stopped. That latter represents // some form of error and the application cannot proceed with a stopped // service. Secondly, asiolink::IOService does not provide the poll // method. This is a handy method which runs all ready handlers without // blocking. - asiolink::IOServicePtr& io = getIoService(); - boost::asio::io_service& asio_io_service = io->get_io_service(); // Poll runs all that are ready. If none are ready it returns immediately // with a count of zero. - size_t cnt = asio_io_service.poll(); + size_t cnt = getIOService()->getIOService().poll(); if (!cnt) { // Poll ran no handlers either none are ready or the service has been // stopped. Either way, call run_one to wait for a IO event. If the // service is stopped it will return immediately with a cnt of zero. - cnt = asio_io_service.run_one(); + cnt = getIOService()->getIOService().run_one(); } return (cnt); @@ -283,7 +281,7 @@ D2Process::configure(isc::data::ConstElementPtr config_set, bool check_only) { if (HooksManager::calloutsPresent(Hooks.hooks_index_d2_srv_configured_)) { CalloutHandlePtr callout_handle = HooksManager::createCalloutHandle(); - callout_handle->setArgument("io_context", getIoService()); + callout_handle->setArgument("io_context", getIOService()); callout_handle->setArgument("json_config", config_set); callout_handle->setArgument("server_config", getD2CfgMgr()->getD2CfgContext()); diff --git a/src/bin/d2/tests/d2_process_unittests.cc b/src/bin/d2/tests/d2_process_unittests.cc index fd2f8f58b1..e2e11b2a74 100644 --- a/src/bin/d2/tests/d2_process_unittests.cc +++ b/src/bin/d2/tests/d2_process_unittests.cc @@ -561,7 +561,7 @@ TEST_F(D2ProcessTest, canShutdown) { TEST_F(D2ProcessTest, normalShutdown) { // Use an asiolink IntervalTimer and callback to generate the // shutdown invocation. (Note IntervalTimer setup is in milliseconds). - isc::asiolink::IntervalTimer timer(*getIoService()); + isc::asiolink::IntervalTimer timer(*getIOService()); timer.setup(std::bind(&D2ProcessTest::genShutdownCallback, this), 2 * 1000); @@ -585,7 +585,7 @@ TEST_F(D2ProcessTest, normalShutdown) { TEST_F(D2ProcessTest, fatalErrorShutdown) { // Use an asiolink IntervalTimer and callback to generate the // the exception. (Note IntervalTimer setup is in milliseconds). - isc::asiolink::IntervalTimer timer(*getIoService()); + isc::asiolink::IntervalTimer timer(*getIOService()); timer.setup(std::bind(&D2ProcessTest::genFatalErrorCallback, this), 2 * 1000); diff --git a/src/bin/d2/tests/d2_queue_mgr_unittests.cc b/src/bin/d2/tests/d2_queue_mgr_unittests.cc index 270de6a9d3..e5e3f117ae 100644 --- a/src/bin/d2/tests/d2_queue_mgr_unittests.cc +++ b/src/bin/d2/tests/d2_queue_mgr_unittests.cc @@ -300,7 +300,7 @@ TEST_F (QueueMgrUDPTest, stateModel) { // Stopping requires IO cancel, which result in a callback. // So process one event and verify we are STOPPED. - io_service_->run_one(); + io_service_->runOne(); EXPECT_EQ(D2QueueMgr::STOPPED, queue_mgr_->getMgrState()); // Verify that we can re-enter the RUNNING from STOPPED by starting the @@ -317,7 +317,7 @@ TEST_F (QueueMgrUDPTest, stateModel) { // Stopping requires IO cancel, which result in a callback. // So process one event and verify we are STOPPED. - io_service_->run_one(); + io_service_->runOne(); EXPECT_EQ(D2QueueMgr::STOPPED, queue_mgr_->getMgrState()); // Verify that we can remove the listener in the STOPPED state and @@ -370,8 +370,8 @@ TEST_F (QueueMgrUDPTest, liveFeed) { ASSERT_NO_THROW(sender_->sendRequest(send_ncr)); // running two should do the send then the receive - io_service_->run_one(); - io_service_->run_one(); + io_service_->runOne(); + io_service_->runOne(); // Verify that the request can be added to the queue and queue // size increments accordingly. @@ -401,8 +401,8 @@ TEST_F (QueueMgrUDPTest, liveFeed) { ASSERT_NO_THROW(sender_->sendRequest(send_ncr)); // running two should do the send then the receive - EXPECT_NO_THROW(io_service_->run_one()); - EXPECT_NO_THROW(io_service_->run_one()); + EXPECT_NO_THROW(io_service_->runOne()); + EXPECT_NO_THROW(io_service_->runOne()); EXPECT_EQ(i+1, queue_mgr_->getQueueSize()); } @@ -418,11 +418,11 @@ TEST_F (QueueMgrUDPTest, liveFeed) { // Send another. The send should succeed. ASSERT_NO_THROW(sender_->sendRequest(send_ncr)); - EXPECT_NO_THROW(io_service_->run_one()); + EXPECT_NO_THROW(io_service_->runOne()); // Now execute the receive which should not throw but should move us // to STOPPED_QUEUE_FULL state. - EXPECT_NO_THROW(io_service_->run_one()); + EXPECT_NO_THROW(io_service_->runOne()); EXPECT_EQ(D2QueueMgr::STOPPED_QUEUE_FULL, queue_mgr_->getMgrState()); // Verify queue size did not increase beyond max. @@ -447,10 +447,10 @@ TEST_F (QueueMgrUDPTest, liveFeed) { // Verify that we can again receive requests. // Send should be fine. ASSERT_NO_THROW(sender_->sendRequest(send_ncr)); - EXPECT_NO_THROW(io_service_->run_one()); + EXPECT_NO_THROW(io_service_->runOne()); // Receive should succeed. - EXPECT_NO_THROW(io_service_->run_one()); + EXPECT_NO_THROW(io_service_->runOne()); EXPECT_EQ(1, queue_mgr_->getQueueSize()); } diff --git a/src/bin/dhcp4/dhcp4_lexer.cc b/src/bin/dhcp4/dhcp4_lexer.cc index a6cc8876a7..d97adc3bef 100644 --- a/src/bin/dhcp4/dhcp4_lexer.cc +++ b/src/bin/dhcp4/dhcp4_lexer.cc @@ -1,6 +1,6 @@ -#line 1 "dhcp4_lexer.cc" +#line 2 "dhcp4_lexer.cc" -#line 3 "dhcp4_lexer.cc" +#line 4 "dhcp4_lexer.cc" #define YY_INT_ALIGNED short int @@ -2255,7 +2255,7 @@ using namespace isc::dhcp; /* To avoid the call to exit... oops! */ #define YY_FATAL_ERROR(msg) isc::dhcp::Parser4Context::fatal(msg) -#line 2258 "dhcp4_lexer.cc" +#line 2259 "dhcp4_lexer.cc" /* noyywrap disables automatic rewinding for the next file to parse. Since we always parse only a single string, there's no need to do any wraps. And using yywrap requires linking with -lfl, which provides the default yywrap @@ -2281,8 +2281,8 @@ using namespace isc::dhcp; by moving it ahead by yyleng bytes. yyleng specifies the length of the currently matched token. */ #define YY_USER_ACTION driver.loc_.columns(yyleng); -#line 2284 "dhcp4_lexer.cc" #line 2285 "dhcp4_lexer.cc" +#line 2286 "dhcp4_lexer.cc" #define INITIAL 0 #define COMMENT 1 @@ -2610,7 +2610,7 @@ YY_DECL } -#line 2613 "dhcp4_lexer.cc" +#line 2614 "dhcp4_lexer.cc" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -5720,7 +5720,7 @@ YY_RULE_SETUP #line 2463 "dhcp4_lexer.ll" ECHO; YY_BREAK -#line 5723 "dhcp4_lexer.cc" +#line 5724 "dhcp4_lexer.cc" case YY_END_OF_BUFFER: { diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 71c385b963..612e8aa58b 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -1020,7 +1020,7 @@ Dhcpv4Srv::run() { while (!shutdown_) { #endif // ENABLE_AFL try { - run_one(); + runOne(); getIOService()->poll(); } catch (const std::exception& e) { // General catch-all exception that are not caught by more specific @@ -1045,7 +1045,7 @@ Dhcpv4Srv::run() { } void -Dhcpv4Srv::run_one() { +Dhcpv4Srv::runOne() { // client's message and server's response Pkt4Ptr query; @@ -1176,7 +1176,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr& query, Pkt4Ptr& rsp, bool allow_packet_park) { *callout_handle); // Callouts decided to drop the received packet. - // The response (rsp) is null so the caller (run_one) will + // The response (rsp) is null so the caller (runOne) will // immediately return too. if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) { LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING, diff --git a/src/bin/dhcp4/dhcp4_srv.h b/src/bin/dhcp4/dhcp4_srv.h index 8321a6a55b..0ed55adfe5 100644 --- a/src/bin/dhcp4/dhcp4_srv.h +++ b/src/bin/dhcp4/dhcp4_srv.h @@ -336,7 +336,7 @@ public: /// Main server processing step. Receives one incoming packet, calls /// the processing packet routing and (if necessary) transmits /// a response. - void run_one(); + void runOne(); /// @brief Process a single incoming DHCPv4 packet and sends the response. /// diff --git a/src/bin/dhcp4/dhcp4to6_ipc.cc b/src/bin/dhcp4/dhcp4to6_ipc.cc index bf34028af0..e3fbcf9abe 100644 --- a/src/bin/dhcp4/dhcp4to6_ipc.cc +++ b/src/bin/dhcp4/dhcp4to6_ipc.cc @@ -61,7 +61,7 @@ void Dhcp4to6Ipc::handler(int /* fd */) { // Receive message from the IPC socket. pkt = ipc.receive(); - // from Dhcpv4Srv::run_one() after receivePacket() + // From Dhcpv4Srv::runOne() after receivePacket() if (pkt) { LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC, DHCP4_DHCP4O6_PACKET_RECEIVED) .arg(static_cast(pkt->getType())) @@ -101,7 +101,7 @@ void Dhcp4to6Ipc::handler(int /* fd */) { // Extract the DHCPv4 packet with DHCPv6 packet attached Pkt4Ptr query(new Pkt4o6(msg->getData(), pkt)); - // From Dhcpv4Srv::run_one() processing and after + // From Dhcpv4Srv::runOne() processing and after Pkt4Ptr rsp; ControlledDhcpv4Srv::getInstance()->processPacket(query, rsp, false); diff --git a/src/bin/dhcp4/tests/dhcp4_client.cc b/src/bin/dhcp4/tests/dhcp4_client.cc index cb3e16ba95..ae466aa97a 100644 --- a/src/bin/dhcp4/tests/dhcp4_client.cc +++ b/src/bin/dhcp4/tests/dhcp4_client.cc @@ -563,9 +563,9 @@ Dhcp4Client::sendMsg(const Pkt4Ptr& msg) { srv_->fakeReceive(msg_copy); try { - // Invoke run_one instead of run, because we want to avoid triggering + // Invoke runOne instead of run, because we want to avoid triggering // IO service. - srv_->run_one(); + srv_->runOne(); } catch (...) { // Suppress errors, as the DHCPv4 server does. } diff --git a/src/bin/dhcp4/tests/kea_controller_unittest.cc b/src/bin/dhcp4/tests/kea_controller_unittest.cc index ea5149fdb9..170a69d505 100644 --- a/src/bin/dhcp4/tests/kea_controller_unittest.cc +++ b/src/bin/dhcp4/tests/kea_controller_unittest.cc @@ -239,9 +239,9 @@ public: // Run as long as the timeout hasn't occurred and the interrupting // condition is not specified or not met. while (!stopped && (!cond || !cond())) { - io_service->run_one(); + io_service->runOne(); } - io_service->get_io_service().reset(); + io_service->getIOService().reset(); } /// @brief This test verifies that the timer used to fetch the configuration diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 7be8d06ca3..60324d0c3f 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -588,7 +588,8 @@ Dhcpv6Srv::initContext(const Pkt6Ptr& pkt, } } -int Dhcpv6Srv::run() { +int +Dhcpv6Srv::run() { #ifdef ENABLE_AFL // Set up structures needed for fuzzing. Fuzz fuzzer(6, server_port_); @@ -603,7 +604,7 @@ int Dhcpv6Srv::run() { while (!shutdown_) { #endif // ENABLE_AFL try { - run_one(); + runOne(); getIOService()->poll(); } catch (const std::exception& e) { // General catch-all standard exceptions that are not caught by more @@ -627,7 +628,8 @@ int Dhcpv6Srv::run() { return (getExitValue()); } -void Dhcpv6Srv::run_one() { +void +Dhcpv6Srv::runOne() { // client's message and server's response Pkt6Ptr query; @@ -766,7 +768,7 @@ Dhcpv6Srv::processPacket(Pkt6Ptr& query, Pkt6Ptr& rsp) { } // Callouts decided to drop the received packet - // The response (rsp) is null so the caller (run_one) will + // The response (rsp) is null so the caller (runOne) will // immediately return too. if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) { LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING, DHCP6_HOOK_BUFFER_RCVD_DROP) diff --git a/src/bin/dhcp6/dhcp6_srv.h b/src/bin/dhcp6/dhcp6_srv.h index c439047e4b..e2c255d809 100644 --- a/src/bin/dhcp6/dhcp6_srv.h +++ b/src/bin/dhcp6/dhcp6_srv.h @@ -147,7 +147,7 @@ public: /// Main server processing step. Receives one incoming packet, calls /// the processing packet routing and (if necessary) transmits /// a response. - void run_one(); + void runOne(); /// @brief Process a single incoming DHCPv6 packet and sends the response. /// diff --git a/src/bin/dhcp6/tests/dhcp6_client.cc b/src/bin/dhcp6/tests/dhcp6_client.cc index 2ab1c9d227..c5954023b3 100644 --- a/src/bin/dhcp6/tests/dhcp6_client.cc +++ b/src/bin/dhcp6/tests/dhcp6_client.cc @@ -973,9 +973,9 @@ Dhcp6Client::sendMsg(const Pkt6Ptr& msg) { srv_->fakeReceive(msg_copy); try { - // Invoke run_one instead of run, because we want to avoid triggering + // Invoke runOne instead of run, because we want to avoid triggering // IO service. - srv_->run_one(); + srv_->runOne(); } catch (...) { // Suppress errors, as the DHCPv6 server does. } diff --git a/src/bin/dhcp6/tests/kea_controller_unittest.cc b/src/bin/dhcp6/tests/kea_controller_unittest.cc index eb06f34707..e7b7780aff 100644 --- a/src/bin/dhcp6/tests/kea_controller_unittest.cc +++ b/src/bin/dhcp6/tests/kea_controller_unittest.cc @@ -226,9 +226,9 @@ public: // Run as long as the timeout hasn't occurred and the interrupting // condition is not specified or not met. while (!stopped && (!cond || !cond())) { - io_service->run_one(); + io_service->runOne(); } - io_service->get_io_service().reset(); + io_service->getIOService().reset(); } /// @brief This test verifies that the timer used to fetch the configuration diff --git a/src/bin/netconf/netconf_process.cc b/src/bin/netconf/netconf_process.cc index 559c4e5738..4c334b6a6e 100644 --- a/src/bin/netconf/netconf_process.cc +++ b/src/bin/netconf/netconf_process.cc @@ -65,9 +65,9 @@ NetconfProcess::run() { size_t NetconfProcess::runIO() { - size_t cnt = getIoService()->get_io_service().poll(); + size_t cnt = getIOService()->getIOService().poll(); if (!cnt) { - cnt = getIoService()->get_io_service().run_one(); + cnt = getIOService()->getIOService().run_one(); } return (cnt); } diff --git a/src/bin/netconf/tests/control_socket_unittests.cc b/src/bin/netconf/tests/control_socket_unittests.cc index 22beff6d8d..7208f083ac 100644 --- a/src/bin/netconf/tests/control_socket_unittests.cc +++ b/src/bin/netconf/tests/control_socket_unittests.cc @@ -211,14 +211,14 @@ void UnixControlSocketTest::reflectServer() { // Acceptor. boost::asio::local::stream_protocol::acceptor - acceptor(io_service_.get_io_service()); + acceptor(io_service_.getIOService()); EXPECT_NO_THROW_LOG(acceptor.open()); boost::asio::local::stream_protocol::endpoint endpoint(unixSocketFilePath()); EXPECT_NO_THROW_LOG(acceptor.bind(endpoint)); EXPECT_NO_THROW_LOG(acceptor.listen()); boost::asio::local::stream_protocol::socket - socket(io_service_.get_io_service()); + socket(io_service_.getIOService()); // Ready. signalReady(); @@ -241,7 +241,7 @@ UnixControlSocketTest::reflectServer() { accepted = true; }); while (!accepted && !timeout) { - io_service_.run_one(); + io_service_.runOne(); } ASSERT_FALSE(ec); @@ -255,7 +255,7 @@ UnixControlSocketTest::reflectServer() { received = cnt; }); while (!received && !timeout) { - io_service_.run_one(); + io_service_.runOne(); } ASSERT_FALSE(ec); rbuf.resize(received); @@ -274,7 +274,7 @@ UnixControlSocketTest::reflectServer() { sent = cnt; }); while (!sent && !timeout) { - io_service_.run_one(); + io_service_.runOne(); } ASSERT_FALSE(ec); @@ -562,7 +562,7 @@ public: signalReady(); // Until stop() is called run IO service. while (!isStopping()) { - io_service_.run_one(); + io_service_.runOne(); } // Main thread signalled that the thread should // terminate. Launch any outstanding IO service @@ -580,13 +580,13 @@ public: /// @brief Stop listener. /// - /// Post an empty action to finish current run_one. + /// Post an empty action to finish current runOne. void stop() { // Notify the thread that it should terminate. signalStopping(); // If the thread is blocked on running the IO // service, post the empty handler to cause - // run_one to return. + // runOne to return. io_service_.post([]() { return; }); // We asked that the thread stops. Let's wait // for it to signal that it has stopped. diff --git a/src/bin/netconf/tests/netconf_process_unittests.cc b/src/bin/netconf/tests/netconf_process_unittests.cc index b71fdad7f3..0b82b6bbee 100644 --- a/src/bin/netconf/tests/netconf_process_unittests.cc +++ b/src/bin/netconf/tests/netconf_process_unittests.cc @@ -63,7 +63,7 @@ TEST(NetconfProcess, construction) { TEST_F(NetconfProcessTest, shutdown) { // Use an asiolink IntervalTimer and callback to generate the // shutdown invocation. (Note IntervalTimer setup is in milliseconds). - IntervalTimer timer(*getIoService()); + IntervalTimer timer(*getIOService()); timer.setup(std::bind(&NetconfProcessTest::genShutdownCallback, this), 200); diff --git a/src/bin/netconf/tests/netconf_unittests.cc b/src/bin/netconf/tests/netconf_unittests.cc index b1bff51898..26c3d7809b 100644 --- a/src/bin/netconf/tests/netconf_unittests.cc +++ b/src/bin/netconf/tests/netconf_unittests.cc @@ -259,7 +259,7 @@ void NetconfAgentTest::fakeServer() { // Acceptor. boost::asio::local::stream_protocol::acceptor - acceptor(io_service_->get_io_service()); + acceptor(io_service_->getIOService()); EXPECT_NO_THROW_LOG(acceptor.open()); boost::asio::local::stream_protocol::endpoint endpoint(unixSocketFilePath()); @@ -268,7 +268,7 @@ NetconfAgentTest::fakeServer() { EXPECT_NO_THROW_LOG(acceptor.bind(endpoint)); EXPECT_NO_THROW_LOG(acceptor.listen()); boost::asio::local::stream_protocol::socket - socket(io_service_->get_io_service()); + socket(io_service_->getIOService()); // Ready. signalReady(); @@ -291,7 +291,7 @@ NetconfAgentTest::fakeServer() { accepted = true; }); while (!accepted && !timeout) { - io_service_->run_one(); + io_service_->runOne(); } ASSERT_FALSE(ec); @@ -305,7 +305,7 @@ NetconfAgentTest::fakeServer() { received = cnt; }); while (!received && !timeout) { - io_service_->run_one(); + io_service_->runOne(); } ASSERT_FALSE(ec); rbuf.resize(received); @@ -334,7 +334,7 @@ NetconfAgentTest::fakeServer() { sent = cnt; }); while (!sent && !timeout) { - io_service_->run_one(); + io_service_->runOne(); } ASSERT_FALSE(ec); -- cgit v1.2.3