Merge pull request #420

ee27559 Update to compile with latest miniupnpc (warptangent)
This commit is contained in:
Riccardo Spagni 2015-10-06 10:51:25 +02:00
commit 5b47019cf4
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -443,7 +443,13 @@ namespace nodetool
if(m_no_igd == false) { if(m_no_igd == false) {
LOG_PRINT_L0("Attempting to add IGD port mapping."); LOG_PRINT_L0("Attempting to add IGD port mapping.");
int result; 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); UPNPDev* deviceList = upnpDiscover(1000, NULL, NULL, 0, 0, &result);
#endif
UPNPUrls urls; UPNPUrls urls;
IGDdatas igdData; IGDdatas igdData;
char lanAddress[64]; char lanAddress[64];