Merge pull request #446 from arvidn/default-gateway-fix-1.1

forward port removal of special case for windows and mingw-1.1
This commit is contained in:
Arvid Norberg 2016-02-01 01:50:28 -05:00
commit 764c8a7f0c
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;
}