forward port removal of special case for windows and mingw in get_default_gateway that appeared wrong

This commit is contained in:
arvidn 2016-01-31 21:14:15 -05:00
parent 9bb0181087
commit 55024ccc4b
1 changed files with 0 additions and 5 deletions

View File

@ -693,13 +693,8 @@ namespace libtorrent
address get_default_gateway(io_service& ios, error_code& ec)
{
std::vector<ip_route> ret = enum_routes(ios, ec);
#if defined TORRENT_WINDOWS || defined TORRENT_MINGW
std::vector<ip_route>::iterator i = std::find_if(ret.begin(), ret.end()
, boost::bind(&is_loopback, boost::bind(&ip_route::destination, _1)));
#else
std::vector<ip_route>::iterator i = std::find_if(ret.begin(), ret.end()
, boost::bind(&ip_route::destination, _1) == address());
#endif
if (i == ret.end()) return address();
return i->gateway;
}