Gavin Andresen 14 years ago
parent
commit
657cfe721b
  1. 6
      net.cpp

6
net.cpp

@ -906,7 +906,8 @@ void ThreadMapPort2(void* parg) @@ -906,7 +906,8 @@ void ThreadMapPort2(void* parg)
struct IGDdatas data;
int r;
if (UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr)) == 1)
r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
if (r == 1)
{
char intClient[16];
char intPort[6];
@ -937,9 +938,10 @@ void ThreadMapPort2(void* parg) @@ -937,9 +938,10 @@ void ThreadMapPort2(void* parg)
} else {
printf("No valid UPnP IGDs found\n");
freeUPNPDevlist(devlist); devlist = 0;
if (r != 0)
FreeUPNPUrls(&urls);
loop {
if (fShutdown)
if (fShutdown || !fUseUPnP)
return;
Sleep(2000);
}

Loading…
Cancel
Save