net: Add -natpmp command line option

This commit is contained in:
Hennadii Stepanov
2020-02-23 02:12:19 +02:00
parent 28acffd9d5
commit a39f7336a3
9 changed files with 49 additions and 14 deletions

View File

@@ -297,9 +297,10 @@ static void MapPortProtoSetEnabled(MapPortProtoFlag proto, bool enabled)
}
}
void StartMapPort(bool use_upnp)
void StartMapPort(bool use_upnp, bool use_natpmp)
{
MapPortProtoSetEnabled(MapPortProtoFlag::UPNP, use_upnp);
MapPortProtoSetEnabled(MapPortProtoFlag::NAT_PMP, use_natpmp);
DispatchMapPort();
}
@@ -320,7 +321,7 @@ void StopMapPort()
}
#else // #if defined(USE_NATPMP) || defined(USE_UPNP)
void StartMapPort(bool use_upnp)
void StartMapPort(bool use_upnp, bool use_natpmp)
{
// Intentionally left blank.
}