sockaddr_storage_familytostring be quite if not debugging

This commit is contained in:
Gioacchino Mazzurco 2018-02-25 13:18:34 +01:00
parent 9281a5966b
commit f5160338ed
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051
2 changed files with 6 additions and 2 deletions

View File

@ -1345,8 +1345,10 @@ void p3LinkMgrIMPL::peerStatus(const RsPeerId& id, const pqiIpAddrSet &addrs,
}
/* This has become very unwieldy - as extra arguments are required for UDP connections */
void p3LinkMgrIMPL::peerConnectRequest(const RsPeerId& id, const struct sockaddr_storage &raddr, const struct sockaddr_storage &proxyaddr, const struct sockaddr_storage &srcaddr,
uint32_t source, uint32_t flags, uint32_t delay, uint32_t bandwidth)
void p3LinkMgrIMPL::peerConnectRequest(
const RsPeerId& id, const sockaddr_storage &raddr,
const sockaddr_storage &proxyaddr, const sockaddr_storage &srcaddr,
uint32_t source, uint32_t flags, uint32_t delay, uint32_t bandwidth )
{
#ifdef LINKMGR_DEBUG
std::cerr << "p3LinkMgrIMPL::peerConnectRequest() id: " << id;

View File

@ -582,10 +582,12 @@ std::string sockaddr_storage_familytostring(const struct sockaddr_storage &addr)
break;
default:
output = "AF_INVALID";
#ifdef SS_DEBUG
std::cerr << __PRETTY_FUNCTION__ << " Got invalid address!"
<< std::endl;
sockaddr_storage_dump(addr);
print_stacktrace();
#endif
break;
}
return output;