mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 14:41:04 -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
|
@ -27,9 +27,9 @@
|
|||
#include "retroshare/rsconfig.h"
|
||||
|
||||
#include "util/rsrandom.h"
|
||||
#include "util/rsstring.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -241,22 +241,22 @@ void PeerConnectStateBox::stateMsg(std::ostream &out, std::string msg, uint32_t
|
|||
std::string PeerConnectStateBox::connectState() const
|
||||
{
|
||||
std::string str = StateAsString(mState);
|
||||
std::ostringstream out;
|
||||
time_t now = time(NULL);
|
||||
out << str << "(" << mNoAttempts << "/" << mNoFailedAttempts << ") for " << now - mStateTS << " secs";
|
||||
std::string out;
|
||||
rs_sprintf(out, "%s(%lu/%lu) for %ld secs", str.c_str(), mNoAttempts, mNoFailedAttempts, now - mStateTS);
|
||||
if ( (mState == CSB_CONNECTED) || (mState == CSB_DIRECT_ATTEMPT) ||
|
||||
(mState == CSB_PROXY_ATTEMPT) || (mState == CSB_RELAY_ATTEMPT) ||
|
||||
(mState == CSB_FAILED_WAIT) )
|
||||
{
|
||||
out << " Last Attempt: " << mAttemptLength;
|
||||
rs_sprintf_append(out, " Last Attempt: %ld", mAttemptLength);
|
||||
}
|
||||
else
|
||||
{
|
||||
out << " LA: " << mAttemptLength;
|
||||
out << " NextAttempt: " << mNextAttemptTS - now;
|
||||
rs_sprintf_append(out, " LA: %ld", mAttemptLength);
|
||||
rs_sprintf_append(out, " NextAttempt: %ld", mNextAttemptTS - now);
|
||||
}
|
||||
|
||||
return out.str();
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue