forked from premiere/premiere-libtorrent
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:
commit
e5eab9dbd1
|
@ -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;
|
||||
|
|
|
@ -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))
|
||||
{}
|
||||
|
|
Loading…
Reference in New Issue