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