mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
commit
9ccb87bf6b
|
@ -25,8 +25,14 @@ void CUPnP::Open(NETADDR Address)
|
|||
|
||||
m_pUPnPDevice = upnpDiscover(2000, NULL, NULL, 0, 0, 2, &Error);
|
||||
|
||||
#if MINIUPNPC_API_VERSION > 17
|
||||
char aWanAddr[64];
|
||||
int Status = UPNP_GetValidIGD(m_pUPnPDevice, m_pUPnPUrls, m_pUPnPData, aLanAddr, sizeof(aLanAddr), aWanAddr, sizeof(aWanAddr));
|
||||
dbg_msg("upnp", "status=%d, lan_addr=%s, wan_addr=%s", Status, aLanAddr, aWanAddr);
|
||||
#else
|
||||
int Status = UPNP_GetValidIGD(m_pUPnPDevice, m_pUPnPUrls, m_pUPnPData, aLanAddr, sizeof(aLanAddr));
|
||||
dbg_msg("upnp", "status=%d, lan_addr=%s", Status, aLanAddr);
|
||||
#endif
|
||||
|
||||
if(Status == 1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue