forked from premiere/premiere-libtorrent
fix simulator build warnings
This commit is contained in:
parent
5105714211
commit
b367a0cd50
|
@ -1 +1 @@
|
||||||
Subproject commit 60d786b8fa6ddaacdc98bdf691220660bc194494
|
Subproject commit c1537196d68a6950e00995d5594dcbce4485effd
|
|
@ -440,13 +440,13 @@ namespace libtorrent
|
||||||
|
|
||||||
std::vector<address> ips = ios.get_ips();
|
std::vector<address> ips = ios.get_ips();
|
||||||
|
|
||||||
for (int i = 0; i < int(ips.size()); ++i)
|
for (auto const& ip : ips)
|
||||||
{
|
{
|
||||||
ip_interface wan;
|
ip_interface wan;
|
||||||
wan.interface_address = ips[i];
|
wan.interface_address = ip;
|
||||||
wan.netmask = address_v4::from_string("255.255.255.255");
|
wan.netmask = address_v4::from_string("255.255.255.255");
|
||||||
strcpy(wan.name, "eth0");
|
strcpy(wan.name, "eth0");
|
||||||
wan.mtu = ios.sim().config().path_mtu(ips[i], ips[i]);
|
wan.mtu = ios.sim().config().path_mtu(ip, ip);
|
||||||
ret.push_back(wan);
|
ret.push_back(wan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -707,14 +707,14 @@ namespace libtorrent
|
||||||
|
|
||||||
std::vector<address> ips = ios.get_ips();
|
std::vector<address> ips = ios.get_ips();
|
||||||
|
|
||||||
for (int i = 0; i < int(ips.size()); ++i)
|
for (auto const& ip : ips)
|
||||||
{
|
{
|
||||||
ip_route r;
|
ip_route r;
|
||||||
if (ips[i].is_v4())
|
if (ip.is_v4())
|
||||||
{
|
{
|
||||||
r.destination = address_v4();
|
r.destination = address_v4();
|
||||||
r.netmask = address_v4::from_string("255.255.255.0");
|
r.netmask = address_v4::from_string("255.255.255.0");
|
||||||
address_v4::bytes_type b = ips[i].to_v4().to_bytes();
|
address_v4::bytes_type b = ip.to_v4().to_bytes();
|
||||||
b[3] = 1;
|
b[3] = 1;
|
||||||
r.gateway = address_v4(b);
|
r.gateway = address_v4(b);
|
||||||
}
|
}
|
||||||
|
@ -722,12 +722,12 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
r.destination = address_v6();
|
r.destination = address_v6();
|
||||||
r.netmask = address_v6::from_string("FFFF:FFFF:FFFF:FFFF::0");
|
r.netmask = address_v6::from_string("FFFF:FFFF:FFFF:FFFF::0");
|
||||||
address_v6::bytes_type b = ips[i].to_v6().to_bytes();
|
address_v6::bytes_type b = ip.to_v6().to_bytes();
|
||||||
b[14] = 1;
|
b[14] = 1;
|
||||||
r.gateway = address_v6(b);
|
r.gateway = address_v6(b);
|
||||||
}
|
}
|
||||||
strcpy(r.name, "eth0");
|
strcpy(r.name, "eth0");
|
||||||
r.mtu = ios.sim().config().path_mtu(ips[i], ips[i]);
|
r.mtu = ios.sim().config().path_mtu(ip, ip);
|
||||||
ret.push_back(r);
|
ret.push_back(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue