add new option to qmake to enable dht stunner

removed dht stunner code when option is not set
This commit is contained in:
sehraf 2016-06-21 13:55:23 +02:00
parent ddce43b282
commit 4d2d825d5b
10 changed files with 89 additions and 21 deletions

View file

@ -152,7 +152,7 @@ std::string p3BitDht::getUdpAddressString()
struct sockaddr_in extAddr;
uint8_t extStable;
#ifdef RS_USE_DHT_STUNNER
if (mDhtStunner->externalAddr(extAddr, extStable))
{
rs_sprintf_append(out, " DhtExtAddr: %s:%u", rs_inet_ntoa(extAddr.sin_addr).c_str(), ntohs(extAddr.sin_port));
@ -187,7 +187,10 @@ std::string p3BitDht::getUdpAddressString()
{
out += " ProxyExtAddr: Unknown ";
}
#else // RS_USE_DHT_STUNNER
// whitespaces taken from above
out = " DhtExtAddr: Unknown ProxyExtAddr: Unknown ";
#endif // RS_USE_DHT_STUNNER
return out;
}