1
0
Fork 0
mirror of https://bitbucket.org/King_DuckZ/keepupnpup.git synced 2024-11-07 21:29:00 +00:00

Don't throw if list ends and delete urls properly.

This commit is contained in:
King_DuckZ 2016-08-26 02:50:08 +02:00
parent 6b7fd47745
commit 88d891a448

View file

@ -56,6 +56,7 @@ namespace kuu {
operator struct UPNPUrls* () { return &urls; } operator struct UPNPUrls* () { return &urls; }
UPNPUrlsWithInitFlag* operator-> () { return this; } UPNPUrlsWithInitFlag* operator-> () { return this; }
bool operator not() const { return not initialized; }
}; };
//see: http://stackoverflow.com/questions/24611215/one-liner-for-raii-on-non-pointer //see: http://stackoverflow.com/questions/24611215/one-liner-for-raii-on-non-pointer
@ -280,7 +281,7 @@ namespace kuu {
retval.push_back(redir); retval.push_back(redir);
} }
else { else if (713 != r) {
throw UPNPException(r, "Error in invocation of UPNP_GetGenericPortMappingEntry()", strupnperror(r)); throw UPNPException(r, "Error in invocation of UPNP_GetGenericPortMappingEntry()", strupnperror(r));
} }