mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-19 17:12:10 +00:00
Yet another pre-2.0 fix for MiniUPNPC (if we have more problems I'll
just drop support for pre-2.0)
This commit is contained in:
parent
5e2ced90f5
commit
8dc9c64297
@ -113,15 +113,19 @@ bool natt_open_port(struct natt_status *status, struct sockaddr *addr, socklen_t
|
||||
proto_str = (proto == SOCKET_PROTOCOL_UDP) ? "UDP" : "TCP";
|
||||
|
||||
/* add the port mapping */
|
||||
#if MINIUPNPC_API_VERSION >= 16
|
||||
r = UPNP_AddAnyPortMapping(urls.controlURL, data.first.servicetype, port_str,
|
||||
port_str, host, "retroarch", proto_str, NULL, "3600", ext_port_str);
|
||||
if (r == 501 /* Action Failed */)
|
||||
{
|
||||
#endif
|
||||
/* try the older AddPortMapping */
|
||||
memcpy(ext_port_str, port_str, 6);
|
||||
r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port_str,
|
||||
port_str, host, "retroarch", proto_str, NULL, "3600");
|
||||
#if MINIUPNPC_API_VERSION >= 16
|
||||
}
|
||||
#endif
|
||||
if (r != 0)
|
||||
return false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user