mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-22 07:41:20 -04:00
Removed some std::ostringstream.
To be continued. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5108 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b2ea453804
commit
9aee68a2a9
8 changed files with 140 additions and 233 deletions
|
@ -149,49 +149,47 @@ int p3BitDht::getNetFailedPeer(std::string peerId, PeerStatus &status)
|
|||
|
||||
std::string p3BitDht::getUdpAddressString()
|
||||
{
|
||||
std::ostringstream out;
|
||||
std::string out;
|
||||
|
||||
struct sockaddr_in extAddr;
|
||||
uint8_t extStable;
|
||||
|
||||
if (mDhtStunner->externalAddr(extAddr, extStable))
|
||||
{
|
||||
out << " DhtExtAddr: " << rs_inet_ntoa(extAddr.sin_addr);
|
||||
out << ":" << ntohs(extAddr.sin_port);
|
||||
rs_sprintf_append(out, " DhtExtAddr: %s:%u", rs_inet_ntoa(extAddr.sin_addr).c_str(), ntohs(extAddr.sin_port));
|
||||
|
||||
if (extStable)
|
||||
{
|
||||
out << " (Stable) ";
|
||||
out += " (Stable) ";
|
||||
}
|
||||
else
|
||||
{
|
||||
out << " (Unstable) ";
|
||||
out += " (Unstable) ";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
out << " DhtExtAddr: Unknown ";
|
||||
out += " DhtExtAddr: Unknown ";
|
||||
}
|
||||
if (mProxyStunner->externalAddr(extAddr, extStable))
|
||||
{
|
||||
out << " ProxyExtAddr: " << rs_inet_ntoa(extAddr.sin_addr);
|
||||
out << ":" << ntohs(extAddr.sin_port);
|
||||
rs_sprintf_append(out, " ProxyExtAddr: %s:%u", rs_inet_ntoa(extAddr.sin_addr).c_str(), ntohs(extAddr.sin_port));
|
||||
|
||||
if (extStable)
|
||||
{
|
||||
out << " (Stable) ";
|
||||
out += " (Stable) ";
|
||||
}
|
||||
else
|
||||
{
|
||||
out << " (Unstable) ";
|
||||
out += " (Unstable) ";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
out << " ProxyExtAddr: Unknown ";
|
||||
out += " ProxyExtAddr: Unknown ";
|
||||
}
|
||||
|
||||
return out.str();
|
||||
return out;
|
||||
}
|
||||
|
||||
void p3BitDht::updateDataRates()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue