forked from premiere/premiere-libtorrent
slight upnp optimization
This commit is contained in:
parent
2d4bdbca7d
commit
aeee715dd6
|
@ -353,8 +353,10 @@ void upnp::on_reply(udp::endpoint const& from, char* buffer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_ignore_non_routers)
|
||||||
|
{
|
||||||
std::vector<ip_route> routes = enum_routes(m_io_service, ec);
|
std::vector<ip_route> routes = enum_routes(m_io_service, ec);
|
||||||
if (m_ignore_non_routers && std::find_if(routes.begin(), routes.end()
|
if (std::find_if(routes.begin(), routes.end()
|
||||||
, bind(&ip_route::gateway, _1) == from.address()) == routes.end())
|
, bind(&ip_route::gateway, _1) == from.address()) == routes.end())
|
||||||
{
|
{
|
||||||
// this upnp device is filtered because it's not in the
|
// this upnp device is filtered because it's not in the
|
||||||
|
@ -378,6 +380,7 @@ void upnp::on_reply(udp::endpoint const& from, char* buffer
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
http_parser p;
|
http_parser p;
|
||||||
bool error = false;
|
bool error = false;
|
||||||
|
|
Loading…
Reference in New Issue