mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 20:19:34 +00:00
p2p: a negative result from UPNP_GetValidIGD is an error
as per the source documentation
This commit is contained in:
parent
1afc1d0d26
commit
0fbbb065d4
1 changed files with 2 additions and 2 deletions
|
@ -2042,7 +2042,7 @@ namespace nodetool
|
||||||
char lanAddress[64];
|
char lanAddress[64];
|
||||||
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
|
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
|
||||||
freeUPNPDevlist(deviceList);
|
freeUPNPDevlist(deviceList);
|
||||||
if (result != 0) {
|
if (result > 0) {
|
||||||
if (result == 1) {
|
if (result == 1) {
|
||||||
std::ostringstream portString;
|
std::ostringstream portString;
|
||||||
portString << port;
|
portString << port;
|
||||||
|
@ -2088,7 +2088,7 @@ namespace nodetool
|
||||||
char lanAddress[64];
|
char lanAddress[64];
|
||||||
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
|
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
|
||||||
freeUPNPDevlist(deviceList);
|
freeUPNPDevlist(deviceList);
|
||||||
if (result != 0) {
|
if (result > 0) {
|
||||||
if (result == 1) {
|
if (result == 1) {
|
||||||
std::ostringstream portString;
|
std::ostringstream portString;
|
||||||
portString << port;
|
portString << port;
|
||||||
|
|
Loading…
Reference in a new issue