aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Vasin <pavel@vasin.nl>2015-08-23 23:53:49 +0300
committerLuke Dashjr <luke-jr+git@utopios.org>2015-09-21 05:21:32 +0000
commit2ede6b7142cb57c422126722f845b36da7d3c4ef (patch)
tree3c7f21d2632a531171d60e66eb207743013207ea
parent0dfcdd41ebf82aa409ec203deeabc900d996c413 (diff)
add support for miniupnpc api version 14
The value of new arg ttl is set to 2 as it's recommended default.
-rw-r--r--src/net.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 80cecd0724..5b79812def 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1020,10 +1020,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;