mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
Modifications for updated Windows Build.
1) mods to use miniupnpc v1.3 2) bugfix to use WriteFile instead of write under windows with gpgme. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1449 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3394239297
commit
870a30eac5
2 changed files with 37 additions and 3 deletions
|
@ -141,14 +141,20 @@ bool SetRedirectAndTest(struct UPNPUrls * urls,
|
|||
printf("GetExternalIPAddress failed.\n");
|
||||
|
||||
// Unix at the moment!
|
||||
#if MINIUPNPC_VERSION >= 12
|
||||
#if MINIUPNPC_VERSION >= 13
|
||||
/* Starting from miniupnpc version 1.2, lease duration parameter is gone */
|
||||
r = UPNP_AddPortMapping(urls->controlURL, data->servicetype,
|
||||
eport, iport, iaddr, 0, proto, NULL);
|
||||
#else
|
||||
#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
|
||||
#else
|
||||
/* The lease parameter is also gone in minupnpc 1.0 */
|
||||
r = UPNP_AddPortMapping(urls->controlURL, data->servicetype,
|
||||
eport, iport, iaddr, 0, proto);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// r = UPNP_AddPortMapping(urls->controlURL, data->servicetype,
|
||||
|
@ -271,7 +277,11 @@ RemoveRedirect(struct UPNPUrls * urls,
|
|||
fprintf(stderr, "protocol invalid\n");
|
||||
return 0;
|
||||
}
|
||||
#if MINIUPNPC_VERSION >= 13
|
||||
UPNP_DeletePortMapping(urls->controlURL, data->servicetype, eport, proto, NULL);
|
||||
#else
|
||||
UPNP_DeletePortMapping(urls->controlURL, data->servicetype, eport, proto);
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue