Remove extra debugging in Broadcast Discovery

This commit is contained in:
Gioacchino Mazzurco 2019-04-16 14:38:59 +02:00
parent 2f92dc1757
commit c727190041
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -31,6 +31,10 @@
#include "serialiser/rsserializer.h"
#include "retroshare/rsevents.h"
#ifdef RS_BROADCAST_DISCOVERY_DEBUG
# include "util/radix64.h"
#endif
/*extern*/ std::shared_ptr<RsBroadcastDiscovery> rsBroadcastDiscovery(nullptr);
RsBroadcastDiscovery::~RsBroadcastDiscovery() { /* Beware of Rs prefix! */ }
RsBroadcastDiscoveryPeerFoundEvent::~RsBroadcastDiscoveryPeerFoundEvent() {}
@ -85,7 +89,6 @@ struct BroadcastDiscoveryPack : RsSerializable
}
};
BroadcastDiscoveryService::BroadcastDiscoveryService(
RsPeers& pRsPeers ) :
mDiscoveredDataMutex("BroadcastDiscoveryService discovered data mutex"),
@ -155,9 +158,17 @@ void BroadcastDiscoveryService::data_tick()
{
for (auto&& pp : mChangedData)
{
std::cerr << __PRETTY_FUNCTION__ << " Got >>>" << pp.second
<< "<<< from: " << UDC::IpToString(pp.first.ip())
#ifdef RS_BROADCAST_DISCOVERY_DEBUG
{
std::string b64Data;
Radix64::encode(
reinterpret_cast<const unsigned char*>(pp.second.data()),
static_cast<int>(pp.second.size()), b64Data );
std::cerr << __PRETTY_FUNCTION__ << " Got: " << b64Data
<< " Base64 from: " << UDC::IpToString(pp.first.ip())
<< ":" << pp.first.port() << std::endl;
}
#endif // def RS_BROADCAST_DISCOVERY_DEBUG
RsBroadcastDiscoveryResult rbdr =
createResult(pp.first, pp.second);