p2p: a negative result from UPNP_GetValidIGD is an error

as per the source documentation
This commit is contained in:
moneromooo-monero 2018-10-15 22:39:51 +00:00
parent 1afc1d0d26
commit 0fbbb065d4
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -2042,7 +2042,7 @@ namespace nodetool
char lanAddress[64];
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
freeUPNPDevlist(deviceList);
if (result != 0) {
if (result > 0) {
if (result == 1) {
std::ostringstream portString;
portString << port;
@ -2088,7 +2088,7 @@ namespace nodetool
char lanAddress[64];
result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
freeUPNPDevlist(deviceList);
if (result != 0) {
if (result > 0) {
if (result == 1) {
std::ostringstream portString;
portString << port;