changed alert messages to use asio to string conversion for endpoint (fixes missing [] on IPv6 addresses)

This commit is contained in:
Arvid Norberg 2008-08-25 21:21:38 +00:00
parent 9625648026
commit d2e5f3919d
1 changed files with 3 additions and 5 deletions

View File

@ -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<std::string>(endpoint.port()) + " failed: "
+ error.message();
return "listening on " + boost::lexical_cast<std::string>(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<std::string>(endpoint.port());
return "successfully listening on " + boost::lexical_cast<std::string>(endpoint);
}
};