Skip to content

Commit

Permalink
Replaced address::from_string with make_address.
Browse files Browse the repository at this point in the history
address::from_string functions in Boost.ASIO were deprecated and removed.
Use make_address free functions as a replacement.

Fixes #239.
  • Loading branch information
Lastique committed Nov 5, 2024
1 parent 29e5fc6 commit 1be8866
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/syslog_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ BOOST_LOG_API void syslog_backend::set_local_address(std::string const& addr, un
}
#else
// Boost.ASIO requires threads for the host name resolver,
// so without threads we simply assume the string already contains IP address
set_local_address(boost::asio::ip::address::from_string(addr), port);
// so without threads we simply assume the string already contains an IP address
set_local_address(asio::ip::make_address(addr), port);
#endif // !defined(BOOST_LOG_NO_THREADS)
}
//! The method sets the local address which log records will be sent from.
Expand Down Expand Up @@ -600,8 +600,8 @@ BOOST_LOG_API void syslog_backend::set_target_address(std::string const& addr, u
}
#else
// Boost.ASIO requires threads for the host name resolver,
// so without threads we simply assume the string already contains IP address
set_target_address(boost::asio::ip::address::from_string(addr), port);
// so without threads we simply assume the string already contains an IP address
set_target_address(asio::ip::make_address(addr), port);
#endif // !defined(BOOST_LOG_NO_THREADS)
}
//! The method sets the address of the remote host where log records will be sent to.
Expand Down

0 comments on commit 1be8866

Please sign in to comment.