aboutsummaryrefslogtreecommitdiff
path: root/src/p2p
diff options
context:
space:
mode:
authorwarptangent <warptangent@inbox.com>2015-10-05 16:49:58 -0700
committerwarptangent <warptangent@inbox.com>2015-10-05 17:07:52 -0700
commitee2755972473225db8535f8dc6abc7afcf8f0bfd (patch)
tree7dd36f40dddf6df33a1fd69cda80e3f1342c754b /src/p2p
parentMerge pull request #410 (diff)
downloadmonero-ee2755972473225db8535f8dc6abc7afcf8f0bfd.tar.xz
Update to compile with latest miniupnpc
upnpDiscover() takes a new argument for TTL. Use the suggested default of 2.
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/net_node.inl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 0561ac584..d92b4bb2a 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -443,7 +443,13 @@ namespace nodetool
if(m_no_igd == false) {
LOG_PRINT_L0("Attempting to add IGD port mapping.");
int result;
+#if MINIUPNPC_API_VERSION > 13
+ // default according to miniupnpc.h
+ unsigned char ttl = 2;
+ UPNPDev* deviceList = upnpDiscover(1000, NULL, NULL, 0, 0, ttl, &result);
+#else
UPNPDev* deviceList = upnpDiscover(1000, NULL, NULL, 0, 0, &result);
+#endif
UPNPUrls urls;
IGDdatas igdData;
char lanAddress[64];