Made failed pinhole request actually fail in terms of return value too.
This commit is contained in:
parent
924b6d1613
commit
6b3ff0242d
|
@ -131,7 +131,7 @@ upnp_add_inboundpinhole(const char * raddr,
|
||||||
#if defined(USE_PF) || defined(USE_NETFILTER)
|
#if defined(USE_PF) || defined(USE_NETFILTER)
|
||||||
*uid = add_pinhole (0/*ext_if_name*/, raddr, rport,
|
*uid = add_pinhole (0/*ext_if_name*/, raddr, rport,
|
||||||
iaddr, iport, proto, desc, timestamp);
|
iaddr, iport, proto, desc, timestamp);
|
||||||
return 1;
|
return *uid >= 0 ? 1 : -1;
|
||||||
#else
|
#else
|
||||||
return -42; /* not implemented */
|
return -42; /* not implemented */
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue