From 19e299049f087f371480954e35d4079529037c13 Mon Sep 17 00:00:00 2001 From: Bill Prendergast Date: Sun, 26 Jul 2026 20:32:34 +1000 Subject: [PATCH 1/3] boost::asio::ip:address::from_string compat fix boost::asio::ip::address::from_string was deprecated in boost-1.66 and removed in boost-1.87 removed the check for boost version safe to use features available from boost-1.74 Signed-off-by: Bill Prendergast --- plugin/cpp/BoostNetworkPlugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/cpp/BoostNetworkPlugin.cpp b/plugin/cpp/BoostNetworkPlugin.cpp index 28ad965b..9fbf53b9 100644 --- a/plugin/cpp/BoostNetworkPlugin.cpp +++ b/plugin/cpp/BoostNetworkPlugin.cpp @@ -31,7 +31,7 @@ BoostNetworkPlugin::BoostNetworkPlugin(Config *config, const std::string &host, : NetworkPlugin(), io_context() { this->config = config; LOG4CXX_INFO(pluginLogger, "Starting the plugin."); - boost::asio::ip::tcp::endpoint ep(boost::asio::ip::address::from_string(host), port); + boost::asio::ip::tcp::endpoint ep(boost::asio::ip::make_address(host), port); socket_ = std::make_shared(io_context); socket_->async_connect(ep, [this, host](boost::system::error_code ec) { if (!ec) { From c51fb2ee17040e3a7e1be8c3b882c5ee4b7e45a7 Mon Sep 17 00:00:00 2001 From: Bill Prendergast Date: Mon, 27 Jul 2026 02:07:20 +1000 Subject: [PATCH 2/3] boost::asio timers compat - boost::asio::deadline_timer is deprecated in boost-1.87 and no longer included in the boost/asio.hpp Convenience header from boost-1.89 - boost::posix_time::duration was pulled in by boost::asio::deadline_timer, the suggested replacement is cxx-11 std::chrono::duration, as the cmake file sets compilation using cxx-11 features, use the cxx-11 std::chrono Signed-off-by: Bill Prendergast --- backends/smstools3/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/smstools3/main.cpp b/backends/smstools3/main.cpp index df62497e..cee7fda5 100644 --- a/backends/smstools3/main.cpp +++ b/backends/smstools3/main.cpp @@ -35,14 +35,14 @@ SMSNetworkPlugin * np = NULL; class SMSNetworkPlugin : public BoostNetworkPlugin { public: - std::shared_ptr m_timer; + std::shared_ptr m_timer; // Maps phone number -> XMPP user JID for SMS routing std::map m_numberToUser; SMSNetworkPlugin(Config *config, const std::string &host, int port) : BoostNetworkPlugin(config, host, port) { - m_timer = std::make_shared(io_context, boost::posix_time::seconds(5)); + m_timer = std::make_shared(io_context, std::chrono::seconds(5)); m_timer->async_wait(boost::bind(&SMSNetworkPlugin::handleSMSDir, this)); } @@ -105,7 +105,7 @@ class SMSNetworkPlugin : public BoostNetworkPlugin { } } - m_timer->expires_from_now(boost::posix_time::seconds(5)); + m_timer->expires_after(std::chrono::seconds(5)); m_timer->async_wait(boost::bind(&SMSNetworkPlugin::handleSMSDir, this)); } From 902a6e49fcfa8d3ef800f690d3cc0f3cd6fcf99c Mon Sep 17 00:00:00 2001 From: Bill Prendergast Date: Mon, 27 Jul 2026 02:28:14 +1000 Subject: [PATCH 3/3] fix boost filesystem v4 in smstools backend Signed-off-by: Bill Prendergast --- backends/smstools3/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/smstools3/main.cpp b/backends/smstools3/main.cpp index cee7fda5..b0ab0870 100644 --- a/backends/smstools3/main.cpp +++ b/backends/smstools3/main.cpp @@ -95,7 +95,7 @@ class SMSNetworkPlugin : public BoostNetworkPlugin { for (directory_iterator itr(p); itr != end_itr; ++itr) { try { - if (is_regular(itr->path())) { + if (is_regular_file(itr->path())) { handleSMS(itr->path().string()); remove(itr->path()); }