mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 11:02:30 -04:00
Changes to support both miniupnpc 1.0 and up-to-date 1.2
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@786 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c0e846f7f7
commit
c222c354d6
3 changed files with 18 additions and 1 deletions
|
@ -141,8 +141,14 @@ bool SetRedirectAndTest(struct UPNPUrls * urls,
|
|||
printf("GetExternalIPAddress failed.\n");
|
||||
|
||||
// Unix at the moment!
|
||||
#if MINIUPNPC_VERSION >= 12
|
||||
/* Starting from miniupnpc version 1.2, lease duration parameter is gone */
|
||||
r = UPNP_AddPortMapping(urls->controlURL, data->servicetype,
|
||||
eport, iport, iaddr, 0, proto);
|
||||
#else
|
||||
r = UPNP_AddPortMapping(urls->controlURL, data->servicetype,
|
||||
eport, iport, iaddr, 0, 0, proto);
|
||||
#endif
|
||||
|
||||
// r = UPNP_AddPortMapping(urls->controlURL, data->servicetype,
|
||||
// eport, iport, iaddr, 0, leaseDuration, proto);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue