AddPortMapping() now returns an error code
This commit is contained in:
parent
859b986385
commit
2c262a8793
|
@ -292,9 +292,11 @@ static int SetRedirectAndTest(struct UPNPUrls * urls,
|
||||||
r = UPNP_AddPortMapping(urls->controlURL, data->first.servicetype,
|
r = UPNP_AddPortMapping(urls->controlURL, data->first.servicetype,
|
||||||
eport, iport, iaddr, description,
|
eport, iport, iaddr, description,
|
||||||
proto, 0, leaseDuration);
|
proto, 0, leaseDuration);
|
||||||
if(r!=UPNPCOMMAND_SUCCESS)
|
if(r!=UPNPCOMMAND_SUCCESS) {
|
||||||
printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n",
|
printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n",
|
||||||
eport, iport, iaddr, r, strupnperror(r));
|
eport, iport, iaddr, r, strupnperror(r));
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
r = UPNP_GetSpecificPortMappingEntry(urls->controlURL,
|
r = UPNP_GetSpecificPortMappingEntry(urls->controlURL,
|
||||||
|
|
Loading…
Reference in New Issue