diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-10-15 22:39:51 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-10-15 22:41:00 +0000 |
commit | 0fbbb065d4d384f6f412d866f45b5583ea6098ac (patch) | |
tree | 55df05195c92898bee6bbfd7489265f5ec450767 | |
parent | Merge pull request #4502 (diff) | |
download | monero-0fbbb065d4d384f6f412d866f45b5583ea6098ac.tar.xz |
p2p: a negative result from UPNP_GetValidIGD is an error
as per the source documentation
Diffstat (limited to '')
-rw-r--r-- | src/p2p/net_node.inl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 9390626a8..705c4da4e 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -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; |