mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 05:23:01 +01:00
Merge pull request #446 from WakiMiko/upnp-desc
Identify as "Bitcoin + version number" when mapping UPnP port
This commit is contained in:
commit
95699e1730
@ -1092,13 +1092,14 @@ void ThreadMapPort2(void* parg)
|
|||||||
{
|
{
|
||||||
char intClient[16];
|
char intClient[16];
|
||||||
char intPort[6];
|
char intPort[6];
|
||||||
|
string strDesc = "Bitcoin " + FormatFullVersion();
|
||||||
|
|
||||||
#ifndef __WXMSW__
|
#ifndef __WXMSW__
|
||||||
r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
|
r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
|
||||||
port, port, lanaddr, 0, "TCP", 0);
|
port, port, lanaddr, strDesc.c_str(), "TCP", 0);
|
||||||
#else
|
#else
|
||||||
r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
|
r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
|
||||||
port, port, lanaddr, 0, "TCP", 0, "0");
|
port, port, lanaddr, strDesc.c_str(), "TCP", 0, "0");
|
||||||
#endif
|
#endif
|
||||||
if(r!=UPNPCOMMAND_SUCCESS)
|
if(r!=UPNPCOMMAND_SUCCESS)
|
||||||
printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n",
|
printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user