mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
removed some debug info
This commit is contained in:
parent
c87de3eb77
commit
fd84639a45
@ -30,6 +30,7 @@
|
||||
#include "rsgenexchange.h"
|
||||
#include "gxssecurity.h"
|
||||
#include "util/contentvalue.h"
|
||||
#include "util/rsprint.h"
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
#include "retroshare/rsgxscircles.h"
|
||||
#include "retroshare/rsgrouter.h"
|
||||
@ -1323,7 +1324,7 @@ bool RsGenExchange::getGroupData(const uint32_t &token, std::vector<RsGxsGrpItem
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "RsGenExchange::getGroupData() ERROR deserialising item";
|
||||
std::cerr << "RsGenExchange::getGroupData() ERROR deserialising item. Item type is probably not handled. Data is: " << RsUtil::BinToHex((unsigned char*)data.bin_data,std::min(50u,data.bin_len)) << ((data.bin_len>50)?"...":"") << std::endl;
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
delete *lit;
|
||||
|
@ -50,7 +50,7 @@ bool RsGxsDataAccess::requestGroupInfo(uint32_t &token, uint32_t ansType, const
|
||||
{
|
||||
if(groupIds.empty())
|
||||
{
|
||||
std::cerr << "Group Id list is empty" << std::endl;
|
||||
std::cerr << "(WW) Group Id list is empty" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,9 @@ bool RsGxsIntegrityCheck::check()
|
||||
|
||||
if(stats.mSuppliers == 0 && stats.mMaxVisibleCount == 0 && stats.mGrpAutoSync)
|
||||
{
|
||||
#ifdef DEBUG_GXSUTIL
|
||||
GXSUTIL_DEBUG() << "Scheduling group \"" << grp->metaData->mGroupName << "\" ID=" << grp->grpId << " in service " << std::hex << mGenExchangeClient->serviceType() << std::dec << " for deletion because it has no suppliers not any visible data at friends." << std::endl;
|
||||
#endif
|
||||
grpsToDel.push_back(grp->grpId);
|
||||
}
|
||||
}
|
||||
|
@ -2790,7 +2790,9 @@ bool p3PeerMgrIMPL::removeBannedIps()
|
||||
{
|
||||
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
|
||||
|
||||
#ifdef PEER_DEBUG
|
||||
std::cerr << "Cleaning known IPs for all peers." << std::endl;
|
||||
#endif
|
||||
|
||||
bool changed = false ;
|
||||
for( std::map<RsPeerId, peerState>::iterator it = mFriendList.begin(); it != mFriendList.end(); ++it)
|
||||
|
@ -407,11 +407,15 @@ public:
|
||||
bool is_signed_id = (bool)(entry.details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED) ;
|
||||
bool is_a_contact = (bool)(entry.details.mFlags & RS_IDENTITY_FLAGS_IS_A_CONTACT) ;
|
||||
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "Identity: " << gxs_id << ": banned: " << is_id_banned << ", own: " << is_own_id << ", contact: " << is_a_contact << ", signed: " << is_signed_id << ", known: " << is_known_id;
|
||||
#endif
|
||||
|
||||
if(is_own_id || is_a_contact)
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << " => kept" << std::endl;
|
||||
#endif
|
||||
return true ;
|
||||
}
|
||||
|
||||
@ -439,15 +443,21 @@ public:
|
||||
else
|
||||
max_keep_time = MAX_KEEP_KEYS_DEFAULT ;
|
||||
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << ". Max keep = " << max_keep_time/86400 << " days. Unused for " << (now - last_usage_ts + 86399)/86400 << " days " ;
|
||||
#endif
|
||||
|
||||
if(should_check && now > last_usage_ts + max_keep_time)
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << " => delete " << std::endl;
|
||||
#endif
|
||||
ids_to_delete.push_back(gxs_id) ;
|
||||
}
|
||||
#ifdef DEBUG_IDS
|
||||
else
|
||||
std::cerr << " => keep " << std::endl;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -484,7 +494,9 @@ void p3IdService::cleanUnusedKeys()
|
||||
|
||||
for(std::list<RsGxsId>::const_iterator it(ids_to_delete.begin());it!=ids_to_delete.end();++it)
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "Deleting identity " << *it << " which is too old." << std::endl;
|
||||
#endif
|
||||
uint32_t token ;
|
||||
RsGxsIdGroup group;
|
||||
group.mMeta.mGroupId=RsGxsGroupId(*it);
|
||||
@ -518,7 +530,9 @@ bool p3IdService::acceptNewGroup(const RsGxsGrpMetaData *grpMeta)
|
||||
{
|
||||
bool res = !rsReputations->isIdentityBanned(RsGxsId(grpMeta->mGroupId)) ;
|
||||
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::acceptNewGroup: ID=" << grpMeta->mGroupId << ": " << (res?"ACCEPTED":"DENIED") << std::endl;
|
||||
#endif
|
||||
|
||||
return res ;
|
||||
}
|
||||
@ -866,7 +880,9 @@ bool p3IdService::requestKey(const RsGxsId &id, const std::list<RsPeerId>& peers
|
||||
// Normally we should call getIdDetails(), but since the key is not known, we need to digg a possibly old information
|
||||
// from the reputation system, which keeps its own list of banned keys. Of course, the owner ID is not known at this point.
|
||||
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "p3IdService::requesting key " << id <<std::endl;
|
||||
#endif
|
||||
|
||||
RsReputations::ReputationInfo info ;
|
||||
rsReputations->getReputationInfo(id,RsPgpId(),info) ;
|
||||
|
Loading…
Reference in New Issue
Block a user