aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorPavel Vasin <pavel@vasin.nl>2015-08-23 23:53:49 +0300
committerPavel Vasin <pavel@vasin.nl>2015-08-23 23:53:49 +0300
commit9f3e48e5219a09b5ddfd6883d1f0498910eff4b6 (patch)
tree08761b90dd4f1a65c7234366862b2612254631f7 /src/net.cpp
parent49793fbb097e9f00149a054adeddad07f0444c12 (diff)
add support for miniupnpc api version 14
The value of new arg ttl is set to 2 as it's recommended default.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index fb5726a2b9..4c6331f8d5 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1120,10 +1120,14 @@ void ThreadMapPort()
#ifndef UPNPDISCOVER_SUCCESS
/* miniupnpc 1.5 */
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
-#else
+#elif MINIUPNPC_API_VERSION < 14
/* miniupnpc 1.6 */
int error = 0;
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
+#else
+ /* miniupnpc 1.9.20150730 */
+ int error = 0;
+ devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
#endif
struct UPNPUrls urls;