mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #226 from G10h4ck/master
Guard checkNetAddress debug, unary + comment clarification
This commit is contained in:
commit
7486d546d4
@ -1025,7 +1025,9 @@ bool p3NetMgrIMPL::checkNetAddress()
|
||||
{
|
||||
prefAddr = *it;
|
||||
validAddr = true;
|
||||
#if defined(NETMGR_DEBUG_TICK) || defined(NETMGR_DEBUG_RESET)
|
||||
std::cout << "p3NetMgrIMPL::checkNetAddress() prefAddr: " << sockaddr_storage_iptostring(prefAddr) << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -1035,7 +1037,6 @@ bool p3NetMgrIMPL::checkNetAddress()
|
||||
{
|
||||
#ifdef NETMGR_DEBUG_RESET
|
||||
std::cerr << "p3NetMgrIMPL::checkNetAddress() no Valid Network Address, resetting network." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
rslog(RSL_WARNING, p3netmgrzone, "p3NetMgr::checkNetAddress() No Valid Network Address, resetting network");
|
||||
netReset();
|
||||
|
@ -420,6 +420,7 @@ void sockaddr_storage_dump(const sockaddr_storage & addr, std::string * outputSt
|
||||
const uint8_t * buf = reinterpret_cast<const uint8_t *>(&addr);
|
||||
for( uint32_t i = 0; i < sizeof(addr); ++i )
|
||||
output << std::setw(2) << std::setfill('0') << std::hex << +buf[i];
|
||||
// The unary +buf[i] operation forces a no-op type conversion to an int with the correct sign
|
||||
}}
|
||||
|
||||
if(outputString)
|
||||
|
Loading…
Reference in New Issue
Block a user