Merge pull request #463 from arvidn/un-deprecate-listen-alert-endpoint

un-deprecate the endpoint field in listen_failed_alert
This commit is contained in:
Arvid Norberg 2016-02-07 14:49:52 -05:00
commit e5eab9dbd1
2 changed files with 0 additions and 6 deletions

View File

@ -1298,10 +1298,8 @@ namespace libtorrent
// the type of listen socket this alert refers to.
socket_type_t sock_type;
#ifndef TORRENT_NO_DEPRECATE
// the address and port libtorrent attempted to listen on
tcp::endpoint endpoint;
#endif
private:
aux::stack_allocator const& m_alloc;

View File

@ -787,14 +787,12 @@ namespace libtorrent {
"SSL/uTP"
};
#ifndef TORRENT_NO_DEPRECATE
tcp::endpoint parse_interface(std::string const& iface, int port)
{
// ignore errors
error_code ec;
return tcp::endpoint(address::from_string(iface, ec), port);
}
#endif
}
listen_failed_alert::listen_failed_alert(
@ -808,9 +806,7 @@ namespace libtorrent {
, operation(op)
, port(prt)
, sock_type(t)
#ifndef TORRENT_NO_DEPRECATE
, endpoint(parse_interface(iface, prt))
#endif
, m_alloc(alloc)
, m_interface_idx(alloc.copy_string(iface))
{}