Merge branch 'upnpfix' of https://github.com/TheBlueMatt/bitcoin
This commit is contained in:
commit
657cfe721b
1 changed files with 5 additions and 3 deletions
8
net.cpp
8
net.cpp
|
@ -906,7 +906,8 @@ void ThreadMapPort2(void* parg)
|
||||||
struct IGDdatas data;
|
struct IGDdatas data;
|
||||||
int r;
|
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 intClient[16];
|
||||||
char intPort[6];
|
char intPort[6];
|
||||||
|
@ -937,9 +938,10 @@ void ThreadMapPort2(void* parg)
|
||||||
} else {
|
} else {
|
||||||
printf("No valid UPnP IGDs found\n");
|
printf("No valid UPnP IGDs found\n");
|
||||||
freeUPNPDevlist(devlist); devlist = 0;
|
freeUPNPDevlist(devlist); devlist = 0;
|
||||||
FreeUPNPUrls(&urls);
|
if (r != 0)
|
||||||
|
FreeUPNPUrls(&urls);
|
||||||
loop {
|
loop {
|
||||||
if (fShutdown)
|
if (fShutdown || !fUseUPnP)
|
||||||
return;
|
return;
|
||||||
Sleep(2000);
|
Sleep(2000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue