mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
removed some debug info
This commit is contained in:
parent
c87de3eb77
commit
fd84639a45
@ -30,6 +30,7 @@
|
|||||||
#include "rsgenexchange.h"
|
#include "rsgenexchange.h"
|
||||||
#include "gxssecurity.h"
|
#include "gxssecurity.h"
|
||||||
#include "util/contentvalue.h"
|
#include "util/contentvalue.h"
|
||||||
|
#include "util/rsprint.h"
|
||||||
#include "retroshare/rsgxsflags.h"
|
#include "retroshare/rsgxsflags.h"
|
||||||
#include "retroshare/rsgxscircles.h"
|
#include "retroshare/rsgxscircles.h"
|
||||||
#include "retroshare/rsgrouter.h"
|
#include "retroshare/rsgrouter.h"
|
||||||
@ -1323,7 +1324,7 @@ bool RsGenExchange::getGroupData(const uint32_t &token, std::vector<RsGxsGrpItem
|
|||||||
}
|
}
|
||||||
else
|
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;
|
std::cerr << std::endl;
|
||||||
}
|
}
|
||||||
delete *lit;
|
delete *lit;
|
||||||
|
@ -50,7 +50,7 @@ bool RsGxsDataAccess::requestGroupInfo(uint32_t &token, uint32_t ansType, const
|
|||||||
{
|
{
|
||||||
if(groupIds.empty())
|
if(groupIds.empty())
|
||||||
{
|
{
|
||||||
std::cerr << "Group Id list is empty" << std::endl;
|
std::cerr << "(WW) Group Id list is empty" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +195,9 @@ bool RsGxsIntegrityCheck::check()
|
|||||||
|
|
||||||
if(stats.mSuppliers == 0 && stats.mMaxVisibleCount == 0 && stats.mGrpAutoSync)
|
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;
|
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);
|
grpsToDel.push_back(grp->grpId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2790,7 +2790,9 @@ bool p3PeerMgrIMPL::removeBannedIps()
|
|||||||
{
|
{
|
||||||
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
|
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
|
||||||
|
|
||||||
|
#ifdef PEER_DEBUG
|
||||||
std::cerr << "Cleaning known IPs for all peers." << std::endl;
|
std::cerr << "Cleaning known IPs for all peers." << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool changed = false ;
|
bool changed = false ;
|
||||||
for( std::map<RsPeerId, peerState>::iterator it = mFriendList.begin(); it != mFriendList.end(); ++it)
|
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_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) ;
|
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;
|
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)
|
if(is_own_id || is_a_contact)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << " => kept" << std::endl;
|
std::cerr << " => kept" << std::endl;
|
||||||
|
#endif
|
||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,15 +443,21 @@ public:
|
|||||||
else
|
else
|
||||||
max_keep_time = MAX_KEEP_KEYS_DEFAULT ;
|
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 " ;
|
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)
|
if(should_check && now > last_usage_ts + max_keep_time)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << " => delete " << std::endl;
|
std::cerr << " => delete " << std::endl;
|
||||||
|
#endif
|
||||||
ids_to_delete.push_back(gxs_id) ;
|
ids_to_delete.push_back(gxs_id) ;
|
||||||
}
|
}
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
else
|
else
|
||||||
std::cerr << " => keep " << std::endl;
|
std::cerr << " => keep " << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
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)
|
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;
|
std::cerr << "Deleting identity " << *it << " which is too old." << std::endl;
|
||||||
|
#endif
|
||||||
uint32_t token ;
|
uint32_t token ;
|
||||||
RsGxsIdGroup group;
|
RsGxsIdGroup group;
|
||||||
group.mMeta.mGroupId=RsGxsGroupId(*it);
|
group.mMeta.mGroupId=RsGxsGroupId(*it);
|
||||||
@ -518,7 +530,9 @@ bool p3IdService::acceptNewGroup(const RsGxsGrpMetaData *grpMeta)
|
|||||||
{
|
{
|
||||||
bool res = !rsReputations->isIdentityBanned(RsGxsId(grpMeta->mGroupId)) ;
|
bool res = !rsReputations->isIdentityBanned(RsGxsId(grpMeta->mGroupId)) ;
|
||||||
|
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
std::cerr << "p3IdService::acceptNewGroup: ID=" << grpMeta->mGroupId << ": " << (res?"ACCEPTED":"DENIED") << std::endl;
|
std::cerr << "p3IdService::acceptNewGroup: ID=" << grpMeta->mGroupId << ": " << (res?"ACCEPTED":"DENIED") << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
return res ;
|
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
|
// 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.
|
// 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;
|
std::cerr << "p3IdService::requesting key " << id <<std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
RsReputations::ReputationInfo info ;
|
RsReputations::ReputationInfo info ;
|
||||||
rsReputations->getReputationInfo(id,RsPgpId(),info) ;
|
rsReputations->getReputationInfo(id,RsPgpId(),info) ;
|
||||||
|
Loading…
Reference in New Issue
Block a user