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