From f5160338ed481713cf5a9877101bfaebd3adde7d Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Sun, 25 Feb 2018 13:18:34 +0100 Subject: [PATCH] sockaddr_storage_familytostring be quite if not debugging --- libretroshare/src/pqi/p3linkmgr.cc | 6 ++++-- libretroshare/src/util/rsnet_ss.cc | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/pqi/p3linkmgr.cc b/libretroshare/src/pqi/p3linkmgr.cc index d3e2b50d0..94f09f6b9 100644 --- a/libretroshare/src/pqi/p3linkmgr.cc +++ b/libretroshare/src/pqi/p3linkmgr.cc @@ -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; diff --git a/libretroshare/src/util/rsnet_ss.cc b/libretroshare/src/util/rsnet_ss.cc index da9ab2dfb..581fd06e9 100644 --- a/libretroshare/src/util/rsnet_ss.cc +++ b/libretroshare/src/util/rsnet_ss.cc @@ -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;