mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 00:07:47 +00:00
Updated dependencies
This commit is contained in:
parent
460b09e70b
commit
23ba77ee4d
8 changed files with 8 additions and 16 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
external/src/libzmq
vendored
2
external/src/libzmq
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 3b264019a24b08246e8a75f5014f893d7b6ffef9
|
Subproject commit c2fae81460d9d39a896da7b3f72484d23a172fa7
|
2
external/src/miniupnp
vendored
2
external/src/miniupnp
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 31995208c9ec40cc89d97ce492481aaf86cfd2e3
|
Subproject commit 7282a75841acd63d83bb30abd43fd40cfa46f023
|
2
external/src/rapidjson
vendored
2
external/src/rapidjson
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 128cc9359fb3c2128928fe18cb833008d918d143
|
Subproject commit 5eb4b2335a3f849c8b421b75354f98a1169fed95
|
18
src/util.cpp
18
src/util.cpp
|
@ -740,23 +740,15 @@ int add_portmapping(int external_port, int internal_port)
|
||||||
UPNPUrls urls;
|
UPNPUrls urls;
|
||||||
IGDdatas data;
|
IGDdatas data;
|
||||||
char local_addr[64] = {};
|
char local_addr[64] = {};
|
||||||
|
char wan_addr[64] = {};
|
||||||
|
|
||||||
int result = UPNP_GetValidIGD(upnp_discover.devlist, &urls, &data, local_addr, sizeof(local_addr));
|
int result = UPNP_GetValidIGD(upnp_discover.devlist, &urls, &data, local_addr, sizeof(local_addr), wan_addr, sizeof(wan_addr));
|
||||||
if (result != 1) {
|
if (result != 1) {
|
||||||
LOGWARN(1, "UPNP_GetValidIGD returned " << result << ", no valid UPnP IGD devices found");
|
LOGWARN(1, "UPNP_GetValidIGD returned " << result << ", no valid UPnP IGD devices found");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGINFO(1, "UPnP: LAN IP address " << log::Gray() << static_cast<const char*>(local_addr));
|
LOGINFO(1, "UPnP: LAN IP address " << log::Gray() << static_cast<const char*>(local_addr) << log::NoColor() << ", WAN IP address " << log::Gray() << static_cast<const char*>(wan_addr));
|
||||||
|
|
||||||
char ext_addr[64] = {};
|
|
||||||
result = UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, ext_addr);
|
|
||||||
if ((result != UPNPCOMMAND_SUCCESS) || !ext_addr[0]) {
|
|
||||||
LOGWARN(1, "UPNP_GetExternalIPAddress: failed to query external IP address, error " << result);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
LOGINFO(1, "UPnP: WAN IP address " << log::Gray() << static_cast<const char*>(ext_addr));
|
|
||||||
}
|
|
||||||
|
|
||||||
char eport[16] = {};
|
char eport[16] = {};
|
||||||
do { log::Stream s(eport); s << external_port; } while (0);
|
do { log::Stream s(eport); s << external_port; } while (0);
|
||||||
|
@ -786,7 +778,7 @@ int add_portmapping(int external_port, int internal_port)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGINFO(1, "UPnP: Mapped " << log::Gray() << static_cast<const char*>(ext_addr) << ':' << external_port << log::NoColor() << " to " << log::Gray() << static_cast<const char*>(local_addr) << ':' << internal_port);
|
LOGINFO(1, "UPnP: Mapped " << log::Gray() << static_cast<const char*>(wan_addr) << ':' << external_port << log::NoColor() << " to " << log::Gray() << static_cast<const char*>(local_addr) << ':' << internal_port);
|
||||||
return external_port;
|
return external_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -805,7 +797,7 @@ void remove_portmapping(int external_port)
|
||||||
IGDdatas data;
|
IGDdatas data;
|
||||||
char local_addr[64] = {};
|
char local_addr[64] = {};
|
||||||
|
|
||||||
int result = UPNP_GetValidIGD(upnp_discover.devlist, &urls, &data, local_addr, sizeof(local_addr));
|
int result = UPNP_GetValidIGD(upnp_discover.devlist, &urls, &data, local_addr, sizeof(local_addr), nullptr, 0);
|
||||||
if (result != 1) {
|
if (result != 1) {
|
||||||
LOGWARN(1, "UPNP_GetValidIGD returned " << result << ", no valid UPnP IGD devices found");
|
LOGWARN(1, "UPNP_GetValidIGD returned " << result << ", no valid UPnP IGD devices found");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue