From d2e5f3919d0fdc0805adedb82df699804985d3ec Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 25 Aug 2008 21:21:38 +0000 Subject: [PATCH] changed alert messages to use asio to string conversion for endpoint (fixes missing [] on IPv6 addresses) --- include/libtorrent/alert_types.hpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/libtorrent/alert_types.hpp b/include/libtorrent/alert_types.hpp index e85f3ed0d..445845caa 100644 --- a/include/libtorrent/alert_types.hpp +++ b/include/libtorrent/alert_types.hpp @@ -1009,9 +1009,8 @@ namespace libtorrent virtual std::string message() const { error_code ec; - return "listening on " + endpoint.address().to_string(ec) + ":" - + boost::lexical_cast(endpoint.port()) + " failed: " - + error.message(); + return "listening on " + boost::lexical_cast(endpoint) + + " failed: " + error.message(); } }; @@ -1031,8 +1030,7 @@ namespace libtorrent virtual std::string message() const { error_code ec; - return "successfully listening on " + endpoint.address().to_string(ec) - + ":" + boost::lexical_cast(endpoint.port()); + return "successfully listening on " + boost::lexical_cast(endpoint); } };