aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2024-08-16 15:02:16 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2024-08-16 15:02:16 +0000
commit12a18174c4f6dbfd63e4902723a12d32a9552e8c (patch)
treedd9b97d0734d0883558c91be2765e9578bad52a0
parent64145bb14ec7cbde29d0611632da16e971aeddf3 (diff)
downloadports-12a18174c4f6dbfd63e4902723a12d32a9552e8c.tar.gz
ports-12a18174c4f6dbfd63e4902723a12d32a9552e8c.zip
net-p2p/monero-cli: fix returcode with miniupnpc 2.2.8
PR: 280298
-rw-r--r--net-p2p/monero-cli/Makefile2
-rw-r--r--net-p2p/monero-cli/files/patch-src_p2p_net__node.inl27
2 files changed, 27 insertions, 2 deletions
diff --git a/net-p2p/monero-cli/Makefile b/net-p2p/monero-cli/Makefile
index b248ad6be563..8cae7b9935d4 100644
--- a/net-p2p/monero-cli/Makefile
+++ b/net-p2p/monero-cli/Makefile
@@ -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
diff --git a/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl b/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl
index b58bd7d07158..b2414132714d 100644
--- a/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl
+++ b/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl
@@ -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.");
+ }