]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3823] backport #3696 to 2.6.3
authorRazvan Becheriu <razvan@isc.org>
Mon, 5 May 2025 12:52:22 +0000 (15:52 +0300)
committerRazvan Becheriu <razvan@isc.org>
Wed, 7 May 2025 18:59:40 +0000 (18:59 +0000)
44 files changed:
.gitignore
AUTHORS
ChangeLog
configure.ac
doc/sphinx/arm/install.rst
m4macros/ax_boost_for_kea.m4
m4macros/ax_cpp14.m4
m4macros/ax_gssapi.m4
m4macros/ax_gtest.m4
m4macros/ax_isc_rpath.m4
src/bin/d2/d2_process.cc
src/lib/asiodns/tests/io_fetch_unittest.cc
src/lib/asiolink/io_acceptor.h
src/lib/asiolink/io_address.cc
src/lib/asiolink/io_service.cc
src/lib/asiolink/io_service.h
src/lib/asiolink/tcp_endpoint.h
src/lib/asiolink/tcp_socket.h
src/lib/asiolink/tests/tcp_acceptor_unittest.cc
src/lib/asiolink/tests/tls_acceptor_unittest.cc
src/lib/asiolink/tests/tls_unittest.cc
src/lib/asiolink/testutils/botan_boost_sample_client.cc
src/lib/asiolink/testutils/botan_boost_sample_server.cc
src/lib/asiolink/testutils/openssl_sample_client.cc
src/lib/asiolink/testutils/openssl_sample_server.cc
src/lib/asiolink/tls_socket.h
src/lib/asiolink/udp_endpoint.h
src/lib/asiolink/udp_socket.h
src/lib/asiolink/unix_domain_socket.cc
src/lib/config/tests/cmd_http_listener_unittests.cc
src/lib/d2srv/tests/dns_client_unittests.cc
src/lib/dhcp/iface_mgr.cc
src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc
src/lib/dns/name.cc
src/lib/dns/name.h
src/lib/http/tests/server_client_unittests.cc
src/lib/http/tests/test_http_client.h
src/lib/http/tests/tls_server_unittests.cc
src/lib/mysql/testutils/mysql_schema.cc
src/lib/process/d_process.h
src/lib/process/testutils/d_test_stubs.h
src/lib/tcp/tests/mt_tcp_listener_mgr_unittests.cc
src/lib/tcp/tests/tcp_test_client.h
src/lib/yang/tests/sysrepo_setup.h

index 16bf24c305ff8f5a1064f864e252939b53994146..7ad44ed67f4264778482ca85a443b3e1ebb17236 100644 (file)
@@ -34,7 +34,7 @@ config.h.in~
 /ltmain.sh
 /missing
 /py-compile
-/stamp-h1
+/stamp-h*
 /test-driver
 /ylwrap
 /kea_version.h
diff --git a/AUTHORS b/AUTHORS
index fb2e4e13d41d4cc02380fc81eee0eb0eb74c28a2..e749ca6cc9441a9c6583fe46b1dc858e05f35a3d 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -265,3 +265,9 @@ We have received the following contributions:
 
  - Kevin P. Fleming
    2023-02: Fixed several examples in DHCPv6 section of the ARM.
+
+ - Dimitry Andric
+   2024-09: Added support for libc++ 19 and later.
+
+ - q66
+   2025-01: Added support for building with Boost 1.87.
index 1392f6046f7d596109c464fca302602dab65be01..abbf7897e629eaeb2cb2eb1967fb47e84ca83401 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2263.  [build]         fdupont, q66
+       Kea can now build with Boost 1.87. The minimum supported Boost
+       version has been bumped up from 1.57 to 1.66. Thanks to q66
+       for the patch.
+       (Gitlab #3823, #3696)
+
+2262.  [build]         dim
+       Replace ``std::basic_string<uint8_t>`` with equivalent
+       ``std::vector<uint8_t>`` constructs, since the former has been
+       deprecated for a while in libc++, and has been completely
+       removed as of libc++ 19.
+       (Gitlab #3823, #3532)
+
 Kea 2.6.2 (stable) released on March 26, 2025
 
 2261.  [build]         mgodzina
index 3c4864dc0bc0b5e2c0bbd5ef200eedd247f77a3d..21f1a2fe9b64635875457d31a77f7e2124a7f15a 100644 (file)
@@ -6,7 +6,7 @@ AC_PREREQ([2.69])
 # For released versions, this is in x.y.z format.
 # For GIT versions, this is x.y.z-git, where x.y.z denotes the next development
 # version that is worked on and that is to be released.
-AC_INIT(kea, 2.6.2-git, kea-dev@lists.isc.org)
+AC_INIT(kea, 2.6.3-git, kea-dev@lists.isc.org)
 AC_CONFIG_SRCDIR(README)
 
 # serial-tests is not available in automake version before 1.13, so
@@ -21,7 +21,7 @@ m4_define([serial_tests], [
 ])
 AM_INIT_AUTOMAKE(foreign serial_tests)
 
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])dnl be backward compatible
+AM_SILENT_RULES([yes])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4macros])
 
@@ -443,7 +443,7 @@ for extra in $werror_extras; do
                 [AC_MSG_ERROR([$CXX does not support $extra"])])
 done
 
-fi                              dnl GXX = yes
+fi  # if test "X$GXX" = "Xyes"
 
 # allow building programs with static link.  we need to make it selective
 # because loadable modules cannot be statically linked.
@@ -1471,9 +1471,9 @@ AX_GSS_API
 AC_DEFINE([CONFIG_H_WAS_INCLUDED], [1], [config.h inclusion marker])
 
 # Autoconf 2.70 has runstatedir.
-m4_version_prereq([2.70], [], [dnl
-    AC_ARG_VAR(runstatedir, [$localstatedir/run for autoconf < 2.70])dnl
-    AC_SUBST(runstatedir)dnl
+m4_version_prereq([2.70], [], [
+    AC_ARG_VAR(runstatedir, [$localstatedir/run for autoconf < 2.70])
+    AC_SUBST(runstatedir)
 ])
 if test "x$runstatedir" = "x"; then
     runstatedir="$localstatedir/run"
index 9d2cca94d6d4b451d0e16316d3497066721fbb52..71708b72d29f62b307217dee52f0d7257575f490 100644 (file)
@@ -157,8 +157,8 @@ Building from source code requires the following software installed on
 the system:
 
 -  Boost C++ libraries (https://www.boost.org/). The oldest Boost version
-   used for testing is 1.57 (although Kea may also work with older
-   versions). The Boost system library must also be installed.
+   used for testing is 1.67 (although Kea may also work with older
+   versions e.g. 1.66). The Boost system library must also be installed.
    Installing a header-only version of Boost is not recommended.
 
 -  OpenSSL (at least version 1.0.2) or Botan (at least version 2).
index a284a4de3a3dee992f82d107b63c2025ac519b4c..996413374a6ec9ad070b7ac44315a97517a1a88f 100644 (file)
@@ -101,6 +101,8 @@ AC_CHECK_HEADERS(boost/asio/coroutine.hpp,,AC_MSG_RESULT(not found, using built-
 
 AC_CHECK_HEADERS(boost/integer/common_factor.hpp)
 
+AC_CHECK_HEADERS(boost/asio/io_context.hpp,,AC_MSG_ERROR([Missing boost asio io_context header: boost version must be at least 1.66]))
+
 # Verify that the path does not include standard headers by mistake.
 # There are two regex.h headers: one is a standard system header (usually
 # in /usr/include) and the second one is provided by boost. If you specify the
@@ -281,4 +283,4 @@ AC_MSG_RESULT([$BOOST_VERSION])
 
 CPPFLAGS="$CPPFLAGS_SAVED"
 AC_LANG_RESTORE
-])dnl AX_BOOST_FOR_KEA
+])
index bc445829c20a0718ef1f36433efe92880538d6d4..f061c57bc6efae68f243bc5f42b91491fc599e3b 100644 (file)
@@ -250,4 +250,4 @@ for retry in "none" "--std=c++14" "--std=c++1y" "fail"; do
         break
 done
 
-])dnl AX_ISC_CPP14
+])
index 539343edad50bcabcffe727cbffaca31904c528c..36f851e1a948da3d950bef254163f16f3cd0e7dc 100644 (file)
@@ -90,4 +90,4 @@ AC_SUBST(GSSAPI_LIBS)
 AC_SUBST(DISTCHECK_GSSAPI_CONFIGURE_FLAG)
 AM_CONDITIONAL([HAVE_GSSAPI], [test $ENABLE_GSSAPI = "yes"])
 
-])dnl AX_GSS_API
+])
index 138a03f6e0f73f37ceb1031479857992cfb50b4c..479cc1896b97a1988f747ce04053a3ab4d7ecc50 100644 (file)
@@ -221,4 +221,4 @@ AC_SUBST(GTEST_LDFLAGS)
 AC_SUBST(GTEST_LDADD)
 AC_SUBST(GTEST_SOURCE)
 
-])dnl AX_ISC_GTEST
+])
index cae89b968e119e6ff6104913844021250e5346b9..07dade900341fb4539ff76c7ab38b03f7aa8362b 100644 (file)
@@ -61,4 +61,4 @@ if test x$rpath != xno; then
     CCFLAGS=$CCFLAGS_SAVED
 fi
 
-])dnl AX_ISC_RPATH
+])
index 75d0704551ab892881f915ee6b0ab01d713ad62d..b5d727119d1e941a46436a4ffb3aa1b5d15f8145 100644 (file)
@@ -133,16 +133,7 @@ size_t
 D2Process::runIO() {
     // Handle events registered by hooks using external IOService objects.
     IOServiceMgr::instance().pollIOServices();
-    // 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::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.
-
+    // We want to block until at least one handler is called.
     // Poll runs all that are ready. If none are ready it returns immediately
     // with a count of zero.
     size_t cnt = getIOService()->poll();
index 7db3dc66bc37d8b5550dd06b202493968ff6e09d..a412fec94a2571579ef37da6d399ebffa687c8b1 100644 (file)
@@ -44,7 +44,7 @@ namespace ph = std::placeholders;
 namespace isc {
 namespace asiodns {
 
-const boost::asio::ip::address TEST_HOST(boost::asio::ip::address::from_string("127.0.0.1"));
+const boost::asio::ip::address TEST_HOST(boost::asio::ip::make_address("127.0.0.1"));
 const uint16_t TEST_PORT(5301);
 const int SEND_INTERVAL = 250;      // Interval in ms between TCP sends
 const size_t MAX_SIZE = 64 * 1024;  // Should be able to take 64kB
index 0909048880cdc06f5676de00d542bada4f2183ea..4491f7c3aaca8d28aea740b4b971af707ba2ac9a 100644 (file)
@@ -47,11 +47,7 @@ public:
 
     /// @brief Returns file descriptor of the underlying socket.
     virtual int getNative() const {
-#if BOOST_VERSION < 106600
-        return (acceptor_->native());
-#else
         return (acceptor_->native_handle());
-#endif
     }
 
     /// @brief Opens acceptor socket given the endpoint.
index 43459bfe5ab3ee38b7bd54f998e01021cfefa09a..a5af53151361b38931b4c07c0afb8850087b35d5 100644 (file)
 #include <sys/socket.h>
 #include <netinet/in.h>
 
+#if BOOST_VERSION < 106600
+#error "Boost ASIO older than 1.66 are not supported"
+#endif
+
 using namespace boost::asio;
 using boost::asio::ip::udp;
 using boost::asio::ip::tcp;
@@ -37,7 +41,7 @@ IOAddress::Hash::operator()(const IOAddress &io_address) const {
 // because we'd like to throw our own exception on failure.
 IOAddress::IOAddress(const std::string& address_str) {
     boost::system::error_code err;
-    asio_address_ = ip::address::from_string(address_str, err);
+    asio_address_ = ip::make_address(address_str, err);
     if (err) {
         isc_throw(IOError, "Failed to convert string to address '"
                   << address_str << "': " << err.message());
@@ -116,7 +120,7 @@ IOAddress::isV6Multicast() const {
 uint32_t
 IOAddress::toUint32() const {
     if (asio_address_.is_v4()) {
-        return (asio_address_.to_v4().to_ulong());
+        return (asio_address_.to_v4().to_uint());
     } else {
         isc_throw(BadValue, "Can't convert " << toText()
                   << " address to IPv4.");
index 411de6419153c98f31a0e29249924c76cb26fc80..91af69ade31ae2354cc3acc0a513b328ac78775b 100644 (file)
@@ -30,7 +30,7 @@ public:
     /// @brief The constructor.
     IOServiceImpl() :
         io_service_(),
-        work_(new boost::asio::io_service::work(io_service_)) {
+        work_(boost::asio::make_work_guard(io_service_)) {
     };
 
     /// @brief The destructor.
@@ -92,7 +92,7 @@ public:
 
     /// @brief Restarts the IOService in preparation for a subsequent @ref run() invocation.
     void restart() {
-        io_service_.reset();
+        io_service_.restart();
     }
 
     /// @brief Removes IO service work object to let it finish running
@@ -101,13 +101,13 @@ public:
         work_.reset();
     }
 
-    /// @brief Return the native @c io_service object used in this wrapper.
+    /// @brief Return the native @c io_context object used in this wrapper.
     ///
     /// This is a short term work around to support other Kea modules
-    /// that share the same @c io_service with the authoritative server.
+    /// that share the same @c io_context with the authoritative server.
     /// It will eventually be removed once the wrapper interface is
     /// generalized.
-    boost::asio::io_service& getInternalIOService() {
+    boost::asio::io_context& getInternalIOService() {
         return (io_service_);
     }
 
@@ -115,12 +115,12 @@ public:
     ///
     /// @param callback The callback to be run on the IO service.
     void post(const std::function<void ()>& callback) {
-        io_service_.post(callback);
+        boost::asio::post(io_service_, callback);
     }
 
 private:
-    boost::asio::io_service io_service_;
-    boost::shared_ptr<boost::asio::io_service::work> work_;
+    boost::asio::io_context io_service_;
+    boost::asio::executor_work_guard<boost::asio::io_context::executor_type> work_;
 };
 
 IOService::IOService() : io_impl_(new IOServiceImpl()) {
@@ -169,7 +169,7 @@ IOService::stopWork() {
     io_impl_->stopWork();
 }
 
-boost::asio::io_service&
+boost::asio::io_context&
 IOService::getInternalIOService() {
     return (io_impl_->getInternalIOService());
 }
index 66dff619b9faf702abb4f9e172d4734fc55d805c..7ffd9297b5128eb816a7b19f2d3f70782bf69ed6 100644 (file)
 #include <functional>
 #include <list>
 
-namespace boost {
-namespace asio {
 #if BOOST_VERSION < 106600
-    class io_service;
-#else
-    class io_context;
-    typedef io_context io_service;
+#error "Boost ASIO older than 1.66 are not supported"
 #endif
-}
-}
+
+#include <boost/asio/io_context.hpp>
 
 namespace isc {
 namespace asiolink {
@@ -32,7 +27,7 @@ class IOService;
 /// @brief Defines a smart pointer to an IOService instance.
 typedef boost::shared_ptr<IOService> IOServicePtr;
 
-/// @brief The @ref IOService class is a wrapper for the ASIO @c io_service
+/// @brief The @ref IOService class is a wrapper for the ASIO @c io_context
 /// class.
 class IOService {
     /// @brief Constructors and Destructor.
@@ -99,15 +94,15 @@ public:
     /// when all handlers have been invoked.
     void stopWork();
 
-    /// @brief Return the native @c io_service object used in this wrapper.
+    /// @brief Return the native @c io_context object used in this wrapper.
     ///
     /// This is a short term work around to support other Kea modules
-    /// that share the same @c io_service with the authoritative server.
+    /// that share the same @c io_context with the authoritative server.
     /// It will eventually be removed once the wrapper interface is
     /// generalized.
     ///
-    /// @return The internal io_service object.
-    boost::asio::io_service& getInternalIOService();
+    /// @return The internal io_context object.
+    boost::asio::io_context& getInternalIOService();
 
     /// @brief Post a callback to the end of the queue.
     ///
index 8ebd57551dbe9051b9bc47a1e0a907cb7e4b58de..7c8cb35535dba08fb67aee00e18eafca815a3c7b 100644 (file)
@@ -42,7 +42,7 @@ public:
     /// \param port The TCP port number of the endpoint.
     TCPEndpoint(const IOAddress& address, const unsigned short port) :
         asio_endpoint_placeholder_(
-            new boost::asio::ip::tcp::endpoint(boost::asio::ip::address::from_string(address.toText()),
+            new boost::asio::ip::tcp::endpoint(boost::asio::ip::make_address(address.toText()),
                               port)),
         asio_endpoint_(*asio_endpoint_placeholder_)
     {}
index e56abe412d7ab4d367180c078ccec552db602f01..830f1a2a28f1690c30a2db44350f507d7f6ecfe9 100644 (file)
@@ -73,11 +73,7 @@ public:
 
     /// \brief Return file descriptor of underlying socket
     virtual int getNative() const {
-#if BOOST_VERSION < 106600
-        return (socket_.native());
-#else
         return (socket_.native_handle());
-#endif
     }
 
     /// \brief Return protocol of socket
index a9d93876f6fa31a5a7917264ecbada9e19f9f627..31a53f6505e75cd7c10adf6ad12175d2afbae95f 100644 (file)
@@ -82,7 +82,7 @@ public:
     /// connectHandler as a callback function.
     void connect() {
         boost::asio::ip::tcp::endpoint
-            endpoint(boost::asio::ip::address::from_string(SERVER_ADDRESS),
+            endpoint(boost::asio::ip::make_address(SERVER_ADDRESS),
                      SERVER_PORT);
         socket_.async_connect(endpoint,
                               std::bind(&TCPClient::connectHandler, this,
@@ -208,7 +208,7 @@ public:
     /// unsuccessful.
     TCPAcceptorTest()
         : io_service_(new IOService()), acceptor_(io_service_),
-          asio_endpoint_(boost::asio::ip::address::from_string(SERVER_ADDRESS),
+          asio_endpoint_(boost::asio::ip::make_address(SERVER_ADDRESS),
                          SERVER_PORT),
           endpoint_(asio_endpoint_), test_timer_(io_service_), connections_(),
           clients_(), connections_num_(0), aborted_connections_num_(0),
index 78889cd4ef98eaf9b5029b4a2d9855b6a584d191..a20fdebc7c306ba875937a1bddcf4ffa461026a8 100644 (file)
@@ -83,8 +83,7 @@ public:
     /// connectHandler as a callback function.
     void connect() {
         ip::tcp::endpoint
-            endpoint(ip::address::from_string(SERVER_ADDRESS),
-                     SERVER_PORT);
+            endpoint(ip::make_address(SERVER_ADDRESS), SERVER_PORT);
         socket_.async_connect(endpoint,
                               std::bind(&TLSClient::connectHandler, this,
                                         ph::_1));
@@ -215,8 +214,7 @@ public:
     /// unsuccessful.
     TLSAcceptorTest()
         : io_service_(new IOService()), acceptor_(io_service_),
-          asio_endpoint_(ip::address::from_string(SERVER_ADDRESS),
-                         SERVER_PORT),
+          asio_endpoint_(ip::make_address(SERVER_ADDRESS), SERVER_PORT),
           endpoint_(asio_endpoint_), test_timer_(io_service_), connections_(),
           clients_(), connections_num_(0), aborted_connections_num_(0),
           max_connections_(1), running_(true) {
index cfebf1345cee9d53c7be6adbbd035c10e18a133f..efcf359cb82d63ca9fc1dc32977a2ccdc6ad551c 100644 (file)
@@ -772,7 +772,7 @@ TEST_F(TLSTest, noHandshake) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -877,7 +877,7 @@ TEST_F(TLSTest, serverNotConfigured) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -975,7 +975,7 @@ TEST_F(TLSTest, clientNotConfigured) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -1072,7 +1072,7 @@ TEST_F(TLSTest, clientHTTPnoS) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -1165,7 +1165,7 @@ TEST_F(TLSTest, unknownClient) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -1254,7 +1254,7 @@ TEST_F(TLSTest, anotherClient) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -1353,7 +1353,7 @@ TEST_F(TLSTest, selfSigned) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -1460,7 +1460,7 @@ TEST_F(TLSTest, noHandshakeCloseonError) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -1561,7 +1561,7 @@ TEST_F(TLSTest, serverNotConfiguredCloseonError) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -1658,7 +1658,7 @@ TEST_F(TLSTest, clientNotConfiguredCloseonError) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -1754,7 +1754,7 @@ TEST_F(TLSTest, clientHTTPnoSCloseonError) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -1847,7 +1847,7 @@ TEST_F(TLSTest, anotherClientCloseonError) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -1944,7 +1944,7 @@ TEST_F(TLSTest, selfSignedCloseonError) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -2048,7 +2048,7 @@ TEST_F(TLSTest, anotherClientNoReq) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -2118,7 +2118,7 @@ TEST_F(TLSTest, serverRaw) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -2189,7 +2189,7 @@ TEST_F(TLSTest, trustedSelfSigned) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -2265,7 +2265,7 @@ TEST_F(TLSTest, shutdownInactive) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -2360,7 +2360,7 @@ TEST_F(TLSTest, shutdownActive) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -2469,7 +2469,7 @@ TEST_F(TLSTest, shutdownCloseInactive) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
@@ -2570,7 +2570,7 @@ TEST_F(TLSTest, shutdownCloseActive) {
     server_.reset(new TlsStream<TestCallback>(io_service_, server_ctx));
 
     // Accept a client.
-    tcp::endpoint server_ep(tcp::endpoint(address::from_string(SERVER_ADDRESS),
+    tcp::endpoint server_ep(tcp::endpoint(make_address(SERVER_ADDRESS),
                                           SERVER_PORT));
     tcp::acceptor acceptor(io_service_->getInternalIOService(), server_ep);
     acceptor.set_option(tcp::acceptor::reuse_address(true));
index 16a83e8d2b82b8033704993e78e7b9c4b5b6f004..9ffcde0f32695073230f45faee9016229bb6d33a 100644 (file)
@@ -101,7 +101,7 @@ public:
 class client
 {
 public:
-  client(boost::asio::io_service& io_context,
+  client(boost::asio::io_context& io_context,
       Botan::TLS::Context& context,
       const tcp::endpoint& endpoint)
     : socket_(io_context, context)
@@ -205,11 +205,11 @@ int main(int argc, char* argv[])
       return 1;
     }
 
-    boost::asio::io_service io_context;
+    boost::asio::io_context io_context;
 
     using namespace std; // For atoi.
     tcp::endpoint endpoint(
-      boost::asio::ip::address::from_string(argv[1]), atoi(argv[2]));
+      boost::asio::ip::make_address(argv[1]), atoi(argv[2]));
     Botan::AutoSeeded_RNG rng;
     Client_Credentials_Manager creds_mgr(rng);
     Client_Session_Manager sess_mgr;
index 9d7e8c55b8b7bd9c894e2fdc2bed96bbbdec617e..45ed8cc8fd50ed91d6a2396df88e4bd2915d0c37 100644 (file)
@@ -160,7 +160,7 @@ private:
 class server
 {
 public:
-  server(boost::asio::io_service& io_context,
+  server(boost::asio::io_context& io_context,
          unsigned short port,
          Botan::Credentials_Manager& creds_mgr,
          Botan::RandomNumberGenerator& rng,
@@ -201,7 +201,7 @@ int main(int argc, char* argv[])
       return 1;
     }
 
-    boost::asio::io_service io_context;
+    boost::asio::io_context io_context;
 
     Botan::AutoSeeded_RNG rng;
     Server_Credentials_Manager creds_mgr(rng);
index d71de4e7f4505766e4a1a1ab870f4ba70a280f54..1b8ee01f55fc3aa441d3982abce99b47f317fa08 100644 (file)
@@ -34,7 +34,7 @@ enum { max_length = 1024 };
 class client
 {
 public:
-  client(boost::asio::io_service& io_context,
+  client(boost::asio::io_context& io_context,
       boost::asio::ssl::context& context,
       const tcp::endpoint& endpoint)
     : socket_(io_context, context)
@@ -154,11 +154,11 @@ int main(int argc, char* argv[])
       return 1;
     }
 
-    boost::asio::io_service io_context;
+    boost::asio::io_context io_context;
 
     using namespace std; // For atoi.
     tcp::endpoint endpoint(
-      boost::asio::ip::address::from_string(argv[1]), atoi(argv[2]));
+      boost::asio::ip::make_address(argv[1]), atoi(argv[2]));
 
     boost::asio::ssl::context ctx(boost::asio::ssl::context::method::tls);
     ctx.load_verify_file(CA_("kea-ca.crt"));
index b92e253b057194d95d26f5b42fc500e6dbfeb174..11c7d8c80165b8c0b47678cce0fe7c564f877ad5 100644 (file)
@@ -32,7 +32,7 @@ typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> ssl_socket;
 class session
 {
 public:
-  session(boost::asio::io_service& io_context,
+  session(boost::asio::io_context& io_context,
       boost::asio::ssl::context& context)
     : socket_(io_context, context)
   {
@@ -106,7 +106,7 @@ private:
 class server
 {
 public:
-  server(boost::asio::io_service& io_context, unsigned short port)
+  server(boost::asio::io_context& io_context, unsigned short port)
     : io_context_(io_context),
       acceptor_(io_context,
           boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), port)),
@@ -152,7 +152,7 @@ public:
   }
 
 private:
-  boost::asio::io_service& io_context_;
+  boost::asio::io_context& io_context_;
   boost::asio::ip::tcp::acceptor acceptor_;
   boost::asio::ssl::context context_;
 };
@@ -167,7 +167,7 @@ int main(int argc, char* argv[])
       return 1;
     }
 
-    boost::asio::io_service io_context;
+    boost::asio::io_context io_context;
 
     using namespace std; // For atoi.
     server s(io_context, atoi(argv[1]));
index 80006dc10cce5448b6a5ccdb37f4a6b059ca2ad9..96382cc77f4592e2dde93d919a104f7fa50cc8b3 100644 (file)
@@ -50,11 +50,7 @@ public:
 
     /// @brief Return file descriptor of underlying socket.
     virtual int getNative() const {
-#if BOOST_VERSION < 106600
-        return (socket_.native());
-#else
         return (socket_.native_handle());
-#endif
     }
 
     /// @brief Return protocol of socket.
index f960bf3ce9f4e4fbe33afc6fbbbd2044c22e4b3d..2a3da9f046402a2d57107275249d50fd30bdbeea 100644 (file)
@@ -42,7 +42,7 @@ public:
     /// \param port The UDP port number of the endpoint.
     UDPEndpoint(const IOAddress& address, const unsigned short port) :
         asio_endpoint_placeholder_(
-            new boost::asio::ip::udp::endpoint(boost::asio::ip::address::from_string(address.toText()),
+            new boost::asio::ip::udp::endpoint(boost::asio::ip::make_address(address.toText()),
                               port)),
         asio_endpoint_(*asio_endpoint_placeholder_)
     {}
index 380d344e36a713726aeb52393f9440ed8652df1e..db6c3a8eb4e778ef1255517bc878bc63b4478092 100644 (file)
@@ -63,11 +63,7 @@ public:
 
     /// \brief Return file descriptor of underlying socket
     virtual int getNative() const {
-#if BOOST_VERSION < 106600
-        return (socket_.native());
-#else
         return (socket_.native_handle());
-#endif
     }
 
     /// \brief Return protocol of socket
index f43e1c9e9bbcf77aef93736b3492215e4cc64f0e..88d3dcdc5520b6af08a8b3ce9a806ce87514d862 100644 (file)
@@ -83,7 +83,7 @@ public:
     /// @param buffer Buffers holding the data to be sent.
     /// @param handler User supplied callback to be invoked when data have
     /// been sent or sending error is signalled.
-    void doSend(const boost::asio::const_buffers_1& buffer,
+    void doSend(const boost::asio::const_buffer& buffer,
                 const UnixDomainSocket::Handler& handler);
 
 
@@ -103,7 +103,7 @@ public:
     /// @param ec Error code returned as a result of sending the data.
     /// @param length Length of the data sent.
     void sendHandler(const UnixDomainSocket::Handler& remote_handler,
-                     const boost::asio::const_buffers_1& buffer,
+                     const boost::asio::const_buffer& buffer,
                      const boost::system::error_code& ec,
                      size_t length);
 
@@ -127,7 +127,7 @@ public:
     /// @param buffer A buffer into which the data should be received.
     /// @param handler User supplied callback invoked when data have been
     /// received on an error is signalled.
-    void doReceive(const boost::asio::mutable_buffers_1& buffer,
+    void doReceive(const boost::asio::mutable_buffer& buffer,
                    const UnixDomainSocket::Handler& handler);
 
     /// @brief Local handler invoked as a result of asynchronous receive.
@@ -146,7 +146,7 @@ public:
     /// @param ec Error code returned as a result of asynchronous receive.
     /// @param length Size of the received data.
     void receiveHandler(const UnixDomainSocket::Handler& remote_handler,
-                        const boost::asio::mutable_buffers_1& buffer,
+                        const boost::asio::mutable_buffer& buffer,
                         const boost::system::error_code& ec,
                         size_t length);
 
@@ -197,7 +197,7 @@ UnixDomainSocketImpl::asyncSend(const void* data, const size_t length,
 }
 
 void
-UnixDomainSocketImpl::doSend(const boost::asio::const_buffers_1& buffer,
+UnixDomainSocketImpl::doSend(const boost::asio::const_buffer& buffer,
                              const UnixDomainSocket::Handler& handler) {
     auto local_handler = std::bind(&UnixDomainSocketImpl::sendHandler,
                                    shared_from_this(),
@@ -207,7 +207,7 @@ UnixDomainSocketImpl::doSend(const boost::asio::const_buffers_1& buffer,
 
 void
 UnixDomainSocketImpl::sendHandler(const UnixDomainSocket::Handler& remote_handler,
-                                  const boost::asio::const_buffers_1& buffer,
+                                  const boost::asio::const_buffer& buffer,
                                   const boost::system::error_code& ec,
                                   size_t length) {
     // The asynchronous send may return EWOULDBLOCK or EAGAIN on some
@@ -230,7 +230,7 @@ UnixDomainSocketImpl::asyncReceive(void* data, const size_t length,
 }
 
 void
-UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffers_1& buffer,
+UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffer& buffer,
                                 const UnixDomainSocket::Handler& handler) {
     auto local_handler = std::bind(&UnixDomainSocketImpl::receiveHandler,
                                    shared_from_this(),
@@ -240,7 +240,7 @@ UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffers_1& buffer,
 
 void
 UnixDomainSocketImpl::receiveHandler(const UnixDomainSocket::Handler& remote_handler,
-                                     const boost::asio::mutable_buffers_1& buffer,
+                                     const boost::asio::mutable_buffer& buffer,
                                      const boost::system::error_code& ec,
                                      size_t length) {
     // The asynchronous receive may return EWOULDBLOCK or EAGAIN on some
@@ -289,11 +289,7 @@ UnixDomainSocket::UnixDomainSocket(const IOServicePtr& io_service)
 
 int
 UnixDomainSocket::getNative() const {
-#if BOOST_VERSION < 106600
-    return (impl_->socket_.native());
-#else
     return (impl_->socket_.native_handle());
-#endif
 }
 
 int
index d878b8e9a447c2c44faf702975e51cbf57d27165..3c4a45691a9f7208a4279ecf55eacc5d367cdc99 100644 (file)
@@ -179,7 +179,7 @@ public:
 
     /// @brief Runs IO service with optional timeout.
     ///
-    /// We iterate over calls to asio::io_service.run(), until
+    /// We iterate over calls to asio::io_context.run(), until
     /// all the clients have completed their requests.  We do it this way
     /// because the test clients stop the io_service when they're
     /// through with a request.
index ff96dba4491f77e9ad6e4725b2f49426c52fc913..da18bccd92f06d507f4e795c5dc85a0b876d9177 100644 (file)
@@ -397,8 +397,7 @@ public:
         socket_.reset(new udp::socket(service_->getInternalIOService(),
                                       boost::asio::ip::udp::v4()));
         socket_->set_option(socket_base::reuse_address(true));
-        socket_->bind(udp::endpoint(address::from_string(TEST_ADDRESS),
-                                    TEST_PORT));
+        socket_->bind(udp::endpoint(make_address(TEST_ADDRESS), TEST_PORT));
         // Once socket is created, we can post an IO request to receive some
         // packet from this socket. This is asynchronous operation and
         // nothing is received until another IO request to send a query is
@@ -469,8 +468,7 @@ public:
         // Setup our "loopback" server.
         udp::socket udp_socket(service_->getInternalIOService(), boost::asio::ip::udp::v4());
         udp_socket.set_option(socket_base::reuse_address(true));
-        udp_socket.bind(udp::endpoint(address::from_string(TEST_ADDRESS),
-                                      TEST_PORT));
+        udp_socket.bind(udp::endpoint(make_address(TEST_ADDRESS), TEST_PORT));
         udp::endpoint remote;
         udp_socket.async_receive_from(boost::asio::buffer(receive_buffer_,
                                                    sizeof(receive_buffer_)),
index 01a1d63da5d17550bd77dfce938d535516a84b3a..419268bfe5cc86a73e7f64328a28bff0ec687eff 100644 (file)
@@ -1034,7 +1034,7 @@ IfaceMgr::getLocalAddress(const IOAddress& remote_addr, const uint16_t port) {
     }
 
     // Create socket that will be used to connect to remote endpoint.
-    boost::asio::io_service io_service;
+    boost::asio::io_context io_service;
     boost::asio::ip::udp::socket sock(io_service);
 
     boost::system::error_code err_code;
index 46023911f311fb9c23f9536d7d1aa6b3c8497e37..792aa28acea0d516b197c61397280838cfcd5614 100644 (file)
@@ -222,7 +222,7 @@ public:
 
         // Create an endpoint pointed at the listener.
         boost::asio::ip::udp::endpoint
-            listener_endpoint(boost::asio::ip::address::from_string(TEST_ADDRESS),
+            listener_endpoint(boost::asio::ip::make_address(TEST_ADDRESS),
                               LISTENER_PORT);
 
         // A response message is now ready to send. Send it!
index ac48205955059d076857b7fc4bf23c9d900c4733..47d9b8fa4d829b3f5d75aa808c8dd1c4caa0db0d 100644 (file)
@@ -303,7 +303,7 @@ Name::Name(const std::string &namestring, bool downcase) {
     // And get the output
     labelcount_ = offsets.size();
     isc_throw_assert(labelcount_ > 0 && labelcount_ <= Name::MAX_LABELS);
-    ndata_.assign(ndata.data(), ndata.size());
+    ndata_.assign(ndata.data(), ndata.data() + ndata.size());
     length_ = ndata_.size();
     offsets_.assign(offsets.begin(), offsets.end());
 }
@@ -336,7 +336,7 @@ Name::Name(const char* namedata, size_t data_len, const Name* origin,
     // Get the output
     labelcount_ = offsets.size();
     isc_throw_assert(labelcount_ > 0 && labelcount_ <= Name::MAX_LABELS);
-    ndata_.assign(ndata.data(), ndata.size());
+    ndata_.assign(ndata.data(), ndata.data() + ndata.size());
     length_ = ndata_.size();
     offsets_.assign(offsets.begin(), offsets.end());
 
@@ -347,7 +347,7 @@ Name::Name(const char* namedata, size_t data_len, const Name* origin,
         // Drop the last character of the data (the \0) and append a copy of
         // the origin's data
         ndata_.erase(ndata_.end() - 1);
-        ndata_.append(origin->ndata_);
+        ndata_.insert(ndata_.end(), origin->ndata_.begin(), origin->ndata_.end());
 
         // Do a similar thing with offsets. However, we need to move them
         // so they point after the prefix we parsed before.
@@ -582,7 +582,7 @@ Name::concatenate(const Name& suffix) const {
 
     Name retname;
     retname.ndata_.reserve(length);
-    retname.ndata_.assign(ndata_, 0, length_ - 1);
+    retname.ndata_.assign(ndata_.data(), ndata_.data() + length_ - 1);
     retname.ndata_.insert(retname.ndata_.end(),
                           suffix.ndata_.begin(), suffix.ndata_.end());
     isc_throw_assert(retname.ndata_.size() == length);
@@ -622,7 +622,7 @@ Name::reverse() const {
     NameString::const_iterator n0 = ndata_.begin();
     retname.offsets_.push_back(0);
     while (rit1 != offsets_.rend()) {
-        retname.ndata_.append(n0 + *rit1, n0 + *rit0);
+        retname.ndata_.insert(retname.ndata_.end(), n0 + *rit1, n0 + *rit0);
         retname.offsets_.push_back(retname.ndata_.size());
         ++rit0;
         ++rit1;
@@ -662,7 +662,8 @@ Name::split(const unsigned int first, const unsigned int n) const {
     // original name, and append the trailing dot explicitly.
     //
     retname.ndata_.reserve(retname.offsets_.back() + 1);
-    retname.ndata_.assign(ndata_, offsets_[first], retname.offsets_.back());
+    auto it = ndata_.data() + offsets_[first];
+    retname.ndata_.assign(it, it + retname.offsets_.back());
     retname.ndata_.push_back(0);
 
     retname.length_ = retname.ndata_.size();
index 37723e88f75411fb1572646c7d4a2c1a0c8dd5d4..fac0036ab2f03105ce3ae55caf8b69cf6a62e489 100644 (file)
@@ -228,7 +228,7 @@ class Name {
     //@{
 private:
     /// \brief Name data string
-    typedef std::basic_string<uint8_t> NameString;
+    typedef std::vector<uint8_t> NameString;
     /// \brief Name offsets type
     typedef std::vector<uint8_t> NameOffsets;
 
index 4b71b259fbe58ace7698c79eeffb3410e2abde7d..7eea1187bb8d451872cee502b8c86e41a8c9e9a1 100644 (file)
@@ -943,8 +943,7 @@ TEST_F(HttpListenerTest, addressInUse) {
     tcp::acceptor acceptor(io_service_->getInternalIOService());
     // Use other port than SERVER_PORT to make sure that this TCP connection
     // doesn't affect subsequent tests.
-    tcp::endpoint endpoint(address::from_string(SERVER_ADDRESS),
-                           SERVER_PORT + 1);
+    tcp::endpoint endpoint(make_address(SERVER_ADDRESS), SERVER_PORT + 1);
     acceptor.open(endpoint.protocol());
     acceptor.bind(endpoint);
 
index 64db858db3b34961f4e58c6bd99fcb3a1fecb9e0..e59cab1fc68e5ab46db109b7faeadee4dfc1f14a 100644 (file)
@@ -50,7 +50,7 @@ public:
     ///
     /// @param request HTTP request in the textual format.
     void startRequest(const std::string& request) {
-        tcp::endpoint endpoint(address::from_string(server_address_), server_port_);
+        tcp::endpoint endpoint(make_address(server_address_), server_port_);
         socket_.async_connect(endpoint,
         [this, request](const boost::system::error_code& ec) {
             receive_done_ = false;
index 18aba1d1555344a36bede781b7fa12674a59410f..0db2b5c4a2565295ea962e3e57cb6bc92ebbd716 100644 (file)
@@ -414,8 +414,7 @@ public:
     ///
     /// @param request HTTP request in the textual format.
     void startRequest(const std::string& request) {
-        tcp::endpoint endpoint(address::from_string(SERVER_ADDRESS),
-                               SERVER_PORT);
+        tcp::endpoint endpoint(make_address(SERVER_ADDRESS), SERVER_PORT);
         stream_.lowest_layer().async_connect(endpoint,
         [this, request](const boost::system::error_code& ec) {
             if (ec) {
@@ -1189,8 +1188,7 @@ TEST_F(HttpsListenerTest, addressInUse) {
     tcp::acceptor acceptor(io_service_->getInternalIOService());
     // Use other port than SERVER_PORT to make sure that this TCP connection
     // doesn't affect subsequent tests.
-    tcp::endpoint endpoint(address::from_string(SERVER_ADDRESS),
-                           SERVER_PORT + 1);
+    tcp::endpoint endpoint(make_address(SERVER_ADDRESS), SERVER_PORT + 1);
     acceptor.open(endpoint.protocol());
     acceptor.bind(endpoint);
 
index fd4f8b15342280588a53ab5959678b07e2bd39b5..d0247ad591b8af2ff530923e4490dae2e4847471 100644 (file)
@@ -131,8 +131,8 @@ string getMySQLTlsServerVariable(string variable) {
         if (result) {
             mysql_free_result(result);
         }
-        throw;
     }
+    return (string());
 }
 
 bool isMySQLTlsConfigured() {
index e8775543157c786d55d27c2abb1cabe3d44a1527..074a34f48a572b392877f11467c0ec3b4456baae 100644 (file)
@@ -83,7 +83,7 @@ public:
     /// @param cfg_mgr the configuration manager instance that handles
     /// configuration parsing.
     ///
-    /// @throw DProcessBaseError is io_service is NULL.
+    /// @throw DProcessBaseError if io_service is null.
     DProcessBase(const char* app_name, asiolink::IOServicePtr io_service,
                  DCfgMgrBasePtr cfg_mgr)
         : app_name_(app_name), io_service_(io_service), shut_down_flag_(false),
index 9881ee4dca5657e0651344ebb5d7c98e4c8c5517..159e925ba2bcb22a77f058c2c329275fcb5eda64 100644 (file)
@@ -109,7 +109,7 @@ public:
     /// @param io_service is the io_service used by the caller for
     /// asynchronous event handling.
     ///
-    /// @throw DProcessBaseError is io_service is NULL.
+    /// @throw DProcessBaseError if io_service is null.
     DStubProcess(const char* name, asiolink::IOServicePtr io_service);
 
     /// @brief Invoked after process instantiation to perform initialization.
@@ -237,7 +237,7 @@ protected:
     /// ftCreateProcessException OR ftCreateProcessNull.
     ///
     /// @return returns a pointer to the new process instance (DProcessBase*)
-    /// or NULL if SimFailure is set to ftCreateProcessNull.
+    /// or null if SimFailure is set to ftCreateProcessNull.
     /// @throw throws std::runtime_error if SimFailure is set to
     /// ftCreateProcessException.
     virtual DProcessBase* createProcess();
index ad8ecea4c9a1b69a2979bba77d251d1eec3bf3ef..d5aeda0d55c3edcec9adf20e7c10a33e46f07d33 100644 (file)
@@ -214,7 +214,7 @@ public:
 
     /// @brief Runs IO service with optional timeout.
     ///
-    /// We iterate over calls to asio::io_service.run(), until
+    /// We iterate over calls to asio::io_context.run(), until
     /// all the clients have completed their requests.  We do it this way
     /// because the test clients stop the io_service when they're
     /// through with a request.
index b453eded08a95206be5bd902847626a437b21839..e6658be80cf19442127227e6ccf62fb155db1c06 100644 (file)
@@ -114,7 +114,7 @@ public:
     /// Upon successful connection, carry out the TLS handshake. If the handshake
     /// completes successful start sending requests.
     void start() {
-        isc::asiolink::TCPEndpoint endpoint(boost::asio::ip::address::from_string(server_address_), server_port_);
+        isc::asiolink::TCPEndpoint endpoint(boost::asio::ip::make_address(server_address_), server_port_);
         SocketCallback socket_cb(
             [this](boost::system::error_code ec, size_t /*length */) {
                 receive_done_ = false;
index 4e315dd40265000c3fdbc88277d7878bebd737a0..b5c628b0fb1a6dba7f8ec7d94f6452369fe9f197 100644 (file)
@@ -31,8 +31,8 @@ struct SysrepoSetup {
     /// is the equivalent of running "make shm_clean" in sysrepo:
     /// https://github.com/sysrepo/sysrepo/blob/v1.4.140/CMakeLists.txt#L329-L334
     static void cleanSharedMemory() {
-        call_system("rm -rf /dev/shm/sr_*");
-        call_system("rm -rf /dev/shm/srsub_*");
+        call_system("rm -rf /Users/razvan/isc/git/sysrepo/shm/sr_*");
+        call_system("rm -rf /Users/razvan/isc/git/sysrepo/shm/srsub_*");
     }
 
 private: