mirror of
https://github.com/monero-project/monero.git
synced 2025-01-19 16:13:40 +02:00
upnp: add support for miniupnpc API version 18
miniupnpc 2.2.8 updated API to version 18, with breaking change to
UPNP_GetValidIGD().
See: c0a50ce33e
See: http://miniupnp.free.fr/files/changelog.php?file=miniupnpc-2.2.8.tar.gz
This commit is contained in:
parent
caa62bc9ea
commit
2d885033d2
@ -2985,7 +2985,12 @@ namespace nodetool
|
||||
UPNPUrls urls;
|
||||
IGDdatas igdData;
|
||||
char lanAddress[64];
|
||||
#if MINIUPNPC_API_VERSION < 18
|
||||
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
|
||||
#else
|
||||
char wanAddress[64];
|
||||
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof wanAddress);
|
||||
#endif
|
||||
freeUPNPDevlist(deviceList);
|
||||
if (result > 0) {
|
||||
if (result == 1) {
|
||||
@ -3053,7 +3058,12 @@ namespace nodetool
|
||||
UPNPUrls urls;
|
||||
IGDdatas igdData;
|
||||
char lanAddress[64];
|
||||
#if MINIUPNPC_API_VERSION < 18
|
||||
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
|
||||
#else
|
||||
char wanAddress[64];
|
||||
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof wanAddress);
|
||||
#endif
|
||||
freeUPNPDevlist(deviceList);
|
||||
if (result > 0) {
|
||||
if (result == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user