Update to compile with latest miniupnpc

upnpDiscover() takes a new argument for TTL.
Use the suggested default of 2.
This commit is contained in:
warptangent 2015-10-05 16:49:58 -07:00
parent 1e7fc9c093
commit ee27559724
No known key found for this signature in database
GPG key ID: 0E490BEBFBE4E92D

View file

@ -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];