Merge pull request #234 from Darexon/master

AddPortMapping() now returns an error code
This commit is contained in:
Thomas BERNARD 2017-02-15 23:59:54 +01:00 committed by GitHub
commit 1c893933dc
1 changed files with 3 additions and 1 deletions

View File

@ -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,