forked from premiere/premiere-libtorrent
merged enum_net fix from RC_0_16
This commit is contained in:
parent
80011a4715
commit
f8adec5ee0
|
@ -328,7 +328,10 @@ namespace libtorrent
|
|||
b2 = a2.to_v6().to_bytes();
|
||||
m = mask.to_v6().to_bytes();
|
||||
for (int i = 0; i < int(b1.size()); ++i)
|
||||
{
|
||||
b1[i] &= m[i];
|
||||
b2[i] &= m[i];
|
||||
}
|
||||
return memcmp(&b1[0], &b2[0], b1.size()) == 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -343,7 +346,8 @@ namespace libtorrent
|
|||
for (std::vector<ip_interface>::iterator i = net.begin()
|
||||
, end(net.end()); i != end; ++i)
|
||||
{
|
||||
if (match_addr_mask(addr, i->interface_address, i->netmask)) return true;
|
||||
if (match_addr_mask(addr, i->interface_address, i->netmask))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue