mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 19:14:01 +01:00
fixed UPnP build
This commit is contained in:
parent
996f61efe1
commit
a003e396c5
14
UPnP.cpp
14
UPnP.cpp
|
@ -101,19 +101,19 @@ namespace transport
|
||||||
|
|
||||||
void UPnP::Run ()
|
void UPnP::Run ()
|
||||||
{
|
{
|
||||||
std::vector<data::RouterInfo::Address> a = context.GetRouterInfo().GetAddresses();
|
auto& a = context.GetRouterInfo().GetAddresses();
|
||||||
for (auto& address : a)
|
for (auto address : a)
|
||||||
{
|
{
|
||||||
if (!address.host.is_v6 ())
|
if (!address->host.is_v6 ())
|
||||||
{
|
{
|
||||||
Discover ();
|
Discover ();
|
||||||
if (address.transportStyle == data::RouterInfo::eTransportSSU )
|
if (address->transportStyle == data::RouterInfo::eTransportSSU )
|
||||||
{
|
{
|
||||||
TryPortMapping (I2P_UPNP_UDP, address.port);
|
TryPortMapping (I2P_UPNP_UDP, address->port);
|
||||||
}
|
}
|
||||||
else if (address.transportStyle == data::RouterInfo::eTransportNTCP )
|
else if (address->transportStyle == data::RouterInfo::eTransportNTCP )
|
||||||
{
|
{
|
||||||
TryPortMapping (I2P_UPNP_TCP, address.port);
|
TryPortMapping (I2P_UPNP_TCP, address->port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue