|
|
@ -115,10 +115,16 @@ namespace transport |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (MINIUPNPC_API_VERSION >= 18) |
|
|
|
|
|
|
|
err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr), |
|
|
|
|
|
|
|
m_externalIPAddress, sizeof (m_externalIPAddress)); |
|
|
|
|
|
|
|
#else |
|
|
|
err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr)); |
|
|
|
err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr)); |
|
|
|
|
|
|
|
#endif |
|
|
|
m_upnpUrlsInitialized=err!=0; |
|
|
|
m_upnpUrlsInitialized=err!=0; |
|
|
|
if (err == UPNP_IGD_VALID_CONNECTED) |
|
|
|
if (err == UPNP_IGD_VALID_CONNECTED) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
#if (MINIUPNPC_API_VERSION < 18) |
|
|
|
err = UPNP_GetExternalIPAddress (m_upnpUrls.controlURL, m_upnpData.first.servicetype, m_externalIPAddress); |
|
|
|
err = UPNP_GetExternalIPAddress (m_upnpUrls.controlURL, m_upnpData.first.servicetype, m_externalIPAddress); |
|
|
|
if(err != UPNPCOMMAND_SUCCESS) |
|
|
|
if(err != UPNPCOMMAND_SUCCESS) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -126,6 +132,7 @@ namespace transport |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
|
|
|
|
#endif |
|
|
|
{ |
|
|
|
{ |
|
|
|
LogPrint (eLogError, "UPnP: Found Internet Gateway Device ", m_upnpUrls.controlURL); |
|
|
|
LogPrint (eLogError, "UPnP: Found Internet Gateway Device ", m_upnpUrls.controlURL); |
|
|
|
if (!m_externalIPAddress[0]) |
|
|
|
if (!m_externalIPAddress[0]) |
|
|
|