mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
net-p2p/monero-cli: fix returcode with miniupnpc 2.2.8
PR: 280298
This commit is contained in:
parent
64145bb14e
commit
12a18174c4
2 changed files with 27 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
PORTNAME= monero-cli
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.18.3.1
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= net-p2p finance
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
freeUPNPDevlist(deviceList);
|
||||
if (result > 0) {
|
||||
if (result == 1) {
|
||||
@@ -3057,7 +3061,11 @@ namespace nodetool
|
||||
@@ -3057,10 +3061,18 @@ namespace nodetool
|
||||
UPNPUrls urls;
|
||||
IGDdatas igdData;
|
||||
char lanAddress[64];
|
||||
|
@ -36,4 +36,29 @@
|
|||
+#endif
|
||||
freeUPNPDevlist(deviceList);
|
||||
if (result > 0) {
|
||||
+#if MINIUPNPC_API_VERSION >= 18
|
||||
+ if ((result == 1) || (result == 2)) {
|
||||
+#else
|
||||
if (result == 1) {
|
||||
+#endif
|
||||
std::ostringstream portString;
|
||||
portString << port;
|
||||
|
||||
@@ -3071,10 +3083,17 @@ namespace nodetool
|
||||
} else {
|
||||
MLOG_GREEN(el::Level::Info, "Deleted IGD port mapping.");
|
||||
}
|
||||
+#if MINIUPNPC_API_VERSION >= 18
|
||||
+ } else if (result == 3) {
|
||||
+ MWARNING("IGD was found but reported as not connected.");
|
||||
+ } else if (result == 4) {
|
||||
+ MWARNING("UPnP device was found but not recognized as IGD.");
|
||||
+#else
|
||||
} else if (result == 2) {
|
||||
MWARNING("IGD was found but reported as not connected.");
|
||||
} else if (result == 3) {
|
||||
MWARNING("UPnP device was found but not recognized as IGD.");
|
||||
+#endif
|
||||
} else {
|
||||
MWARNING("UPNP_GetValidIGD returned an unknown result code.");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue