mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
upnp: add compatibility for miniupnpc 2.2.8
See:c0a50ce33eThe return value of 2 now indicates: "A valid connected IGD has been found but its IP address is reserved (non routable)" We continue to ignore any return value other than 1. (cherry picked from commit8acdf66540)
This commit is contained in:
parent
d1a9ff3478
commit
cad37df99f
1 changed files with 4 additions and 1 deletions
|
|
@ -168,8 +168,11 @@ static bool ProcessUpnp()
|
|||
struct UPNPUrls urls;
|
||||
struct IGDdatas data;
|
||||
int r;
|
||||
|
||||
#if MINIUPNPC_API_VERSION <= 17
|
||||
r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
|
||||
#else
|
||||
r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), nullptr, 0);
|
||||
#endif
|
||||
if (r == 1)
|
||||
{
|
||||
if (fDiscover) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue