From ee2755972473225db8535f8dc6abc7afcf8f0bfd Mon Sep 17 00:00:00 2001 From: warptangent Date: Mon, 5 Oct 2015 16:49:58 -0700 Subject: [PATCH] Update to compile with latest miniupnpc upnpDiscover() takes a new argument for TTL. Use the suggested default of 2. --- src/p2p/net_node.inl | 6 ++++++ 1 file changed, 6 insertions(+) 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];