mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 12:24:24 -04:00
Removed some std::ostringstream.
To be continued. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5103 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
60a68210d5
commit
83bd45caa4
22 changed files with 399 additions and 755 deletions
|
@ -44,8 +44,6 @@ const int p3netmgrzone = 7563;
|
|||
#include "retroshare/rsiface.h"
|
||||
#include "retroshare/rsconfig.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
/* Network setup States */
|
||||
|
||||
const uint32_t RS_NET_NEEDS_RESET = 0x0000;
|
||||
|
@ -138,11 +136,7 @@ p3NetMgrIMPL::p3NetMgrIMPL()
|
|||
std::cerr << "p3NetMgr() Startup" << std::endl;
|
||||
#endif
|
||||
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "p3NetMgr() Startup, resetting network";
|
||||
rslog(RSL_WARNING, p3netmgrzone, out.str());
|
||||
}
|
||||
rslog(RSL_WARNING, p3netmgrzone, "p3NetMgr() Startup, resetting network");
|
||||
netReset();
|
||||
|
||||
return;
|
||||
|
@ -235,11 +229,7 @@ void p3NetMgrIMPL::netReset()
|
|||
#ifdef NETMGR_DEBUG_RESET
|
||||
std::cerr << "p3NetMgrIMPL::netReset() Called" << std::endl;
|
||||
#endif
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "p3NetMgr::netReset() Called";
|
||||
rslog(RSL_ALERT, p3netmgrzone, out.str());
|
||||
}
|
||||
rslog(RSL_ALERT, p3netmgrzone, "p3NetMgr::netReset() Called");
|
||||
|
||||
shutdown(); /* blocking shutdown call */
|
||||
|
||||
|
@ -482,11 +472,7 @@ void p3NetMgrIMPL::netTick()
|
|||
#if defined(NETMGR_DEBUG_TICK) || defined(NETMGR_DEBUG_RESET)
|
||||
std::cerr << "p3NetMgrIMPL::netTick() STATUS: NEEDS_RESET" << std::endl;
|
||||
#endif
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "p3NetMgr::netTick() RS_NET_NEEDS_RESET, resetting network";
|
||||
rslog(RSL_WARNING, p3netmgrzone, out.str());
|
||||
}
|
||||
rslog(RSL_WARNING, p3netmgrzone, "p3NetMgr::netTick() RS_NET_NEEDS_RESET, resetting network");
|
||||
|
||||
netReset();
|
||||
break;
|
||||
|
@ -897,9 +883,7 @@ void p3NetMgrIMPL::netExtCheck()
|
|||
std::string fakeId;
|
||||
netAssistKnownPeer(fakeId, mExtAddr, NETASSIST_KNOWN_PEER_SELF | NETASSIST_KNOWN_PEER_ONLINE);
|
||||
|
||||
std::ostringstream out;
|
||||
out << "p3NetMgr::netExtCheck() Network Setup Complete";
|
||||
rslog(RSL_WARNING, p3netmgrzone, out.str());
|
||||
rslog(RSL_WARNING, p3netmgrzone, "p3NetMgr::netExtCheck() Network Setup Complete");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -925,11 +909,7 @@ bool p3NetMgrIMPL::checkNetAddress()
|
|||
std::cerr << "p3NetMgrIMPL::checkNetAddress() no Valid Network Address, resetting network." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "p3NetMgr::checkNetAddress() No Valid Network Address, resetting network";
|
||||
rslog(RSL_WARNING, p3netmgrzone, out.str());
|
||||
}
|
||||
rslog(RSL_WARNING, p3netmgrzone, "p3NetMgr::checkNetAddress() No Valid Network Address, resetting network");
|
||||
netReset();
|
||||
return false;
|
||||
}
|
||||
|
@ -1043,11 +1023,7 @@ bool p3NetMgrIMPL::checkNetAddress()
|
|||
mPeerMgr->UpdateOwnAddress(mLocalAddr, mExtAddr);
|
||||
}
|
||||
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "p3NetMgr::checkNetAddress() local address changed, resetting network";
|
||||
rslog(RSL_WARNING, p3netmgrzone, out.str());
|
||||
}
|
||||
rslog(RSL_WARNING, p3netmgrzone, "p3NetMgr::checkNetAddress() local address changed, resetting network");
|
||||
netReset();
|
||||
}
|
||||
|
||||
|
@ -1087,11 +1063,7 @@ bool p3NetMgrIMPL::setLocalAddress(struct sockaddr_in addr)
|
|||
#ifdef NETMGR_DEBUG_RESET
|
||||
std::cerr << "p3NetMgrIMPL::setLocalAddress() Calling NetReset" << std::endl;
|
||||
#endif
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "p3NetMgr::setLocalAddress() local address changed, resetting network";
|
||||
rslog(RSL_WARNING, p3netmgrzone, out.str());
|
||||
}
|
||||
rslog(RSL_WARNING, p3netmgrzone, "p3NetMgr::setLocalAddress() local address changed, resetting network");
|
||||
netReset();
|
||||
}
|
||||
return true;
|
||||
|
@ -1116,11 +1088,7 @@ bool p3NetMgrIMPL::setExtAddress(struct sockaddr_in addr)
|
|||
#ifdef NETMGR_DEBUG_RESET
|
||||
std::cerr << "p3NetMgrIMPL::setExtAddress() Calling NetReset" << std::endl;
|
||||
#endif
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "p3NetMgr::setExtAddress() ext address changed, resetting network";
|
||||
rslog(RSL_WARNING, p3netmgrzone, out.str());
|
||||
}
|
||||
rslog(RSL_WARNING, p3netmgrzone, "p3NetMgr::setExtAddress() ext address changed, resetting network");
|
||||
netReset();
|
||||
}
|
||||
return true;
|
||||
|
@ -1164,11 +1132,7 @@ bool p3NetMgrIMPL::setNetworkMode(uint32_t netMode)
|
|||
#ifdef NETMGR_DEBUG_RESET
|
||||
std::cerr << "p3NetMgrIMPL::setNetworkMode() Calling NetReset" << std::endl;
|
||||
#endif
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "p3NetMgr::setNetworkMode() Net Mode changed, resetting network";
|
||||
rslog(RSL_WARNING, p3netmgrzone, out.str());
|
||||
}
|
||||
rslog(RSL_WARNING, p3netmgrzone, "p3NetMgr::setNetworkMode() Net Mode changed, resetting network");
|
||||
netReset();
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue