mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
added names to upnp redirects to avoid router confusion (patch from ET)
This commit is contained in:
parent
972de42864
commit
8b954a240a
@ -381,14 +381,14 @@ bool upnphandler::start_upnp()
|
||||
|
||||
if (!SetRedirectAndTest(&(config -> urls), &(config->data),
|
||||
in_addr, in_port1, eport1, eprot1,
|
||||
NULL /*leaseDuration*/, NULL /*description*/,
|
||||
NULL /*leaseDuration*/, "RetroShare_TCP" /*description*/,
|
||||
0))
|
||||
{
|
||||
upnpState = RS_UPNP_S_TCP_FAILED;
|
||||
}
|
||||
else if (!SetRedirectAndTest(&(config -> urls), &(config->data),
|
||||
in_addr, in_port2, eport2, eprot2,
|
||||
NULL /*leaseDuration*/, NULL /*description*/,
|
||||
NULL /*leaseDuration*/, "RetroShare_UDP" /*description*/,
|
||||
0))
|
||||
{
|
||||
upnpState = RS_UPNP_S_UDP_FAILED;
|
||||
|
@ -298,7 +298,7 @@ int SetRedirectAndTest(struct UPNPUrls * urls,
|
||||
// const char * remoteHost,
|
||||
// const char * leaseDuration);
|
||||
r = UPNP_AddPortMapping(urls->controlURL, servicetype,
|
||||
eport, iport, iaddr, NULL, proto, NULL, NULL);
|
||||
eport, iport, iaddr, description, proto, NULL, NULL);
|
||||
#else
|
||||
#if MINIUPNPC_API_VERSION >= -3 //1.0 2009/04/17
|
||||
/* $Id: upnpcommands.h,v 1.18 2010/06/09 10:59:09 nanard Exp $ */
|
||||
@ -311,7 +311,7 @@ int SetRedirectAndTest(struct UPNPUrls * urls,
|
||||
// const char * proto,
|
||||
// const char * remoteHost);
|
||||
r = UPNP_AddPortMapping(urls->controlURL, servicetype,
|
||||
eport, iport, iaddr, NULL, proto, NULL);
|
||||
eport, iport, iaddr, description, proto, NULL);
|
||||
#else
|
||||
#if MINIUPNPC_API_VERSION >= -7//Before 1.0
|
||||
/* $Id: upnpcommands.h,v 1.14 2008/09/25 18:02:50 nanard Exp $ */
|
||||
@ -323,7 +323,7 @@ int SetRedirectAndTest(struct UPNPUrls * urls,
|
||||
// const char * desc,
|
||||
// const char * proto);
|
||||
r = UPNP_AddPortMapping(urls->controlURL, servicetype,
|
||||
eport, iport, iaddr, NULL, proto);
|
||||
eport, iport, iaddr, description, proto);
|
||||
#else
|
||||
#error MINIUPNPC_API_VERSION is not defined. You may define one follow miniupnpc library version
|
||||
#endif//>=-7
|
||||
|
Loading…
Reference in New Issue
Block a user