mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
commit
dcbd99f0ab
28 changed files with 226 additions and 151 deletions
|
@ -2013,8 +2013,12 @@ void RsGenExchange::publishMsgs()
|
|||
grpId = msg->grpId;
|
||||
msg->metaData->recvTS = time(NULL);
|
||||
|
||||
mRoutingClues[msg->metaData->mAuthorId].insert(rsPeers->getOwnId()) ;
|
||||
mTrackingClues.push_back(std::make_pair(msg->msgId,rsPeers->getOwnId())) ;
|
||||
// FIXTESTS global variable rsPeers not available in unittests!
|
||||
if(rsPeers)
|
||||
{
|
||||
mRoutingClues[msg->metaData->mAuthorId].insert(rsPeers->getOwnId()) ;
|
||||
mTrackingClues.push_back(std::make_pair(msg->msgId,rsPeers->getOwnId())) ;
|
||||
}
|
||||
|
||||
computeHash(msg->msg, msg->metaData->mHash);
|
||||
mDataAccess->addMsgData(msg);
|
||||
|
|
|
@ -482,6 +482,13 @@ public:
|
|||
|
||||
static float computeCurrentSendingProbability()
|
||||
{
|
||||
// FIXTESTS global variable rsConfig not available in unittests!
|
||||
if(rsConfig == 0)
|
||||
{
|
||||
std::cerr << "computeCurrentSendingProbability(): rsConfig not initialised, returning 1.0"<<std::endl;
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
int maxIn=50,maxOut=50;
|
||||
float currIn=0,currOut=0 ;
|
||||
|
||||
|
@ -2705,8 +2712,9 @@ void RsGxsNetService::locked_genReqMsgTransaction(NxsTransaction* tr)
|
|||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
if(rsReputations->isIdentityBanned(syncItem->authorId))
|
||||
// FIXTESTS global variable rsReputations not available in unittests!
|
||||
if(rsReputations == 0){ std::cerr << "rsReputations==0, accepting all messages!" << std::endl; }
|
||||
if(rsReputations && rsReputations->isIdentityBanned(syncItem->authorId))
|
||||
{
|
||||
#ifdef NXS_NET_DEBUG_1
|
||||
GXSNETDEBUG_PG(item->PeerId(),grpId) << ", Identity " << syncItem->authorId << " is banned. Not requesting message!" << std::endl;
|
||||
|
@ -2944,8 +2952,9 @@ void RsGxsNetService::locked_genReqGrpTransaction(NxsTransaction* tr)
|
|||
haveItem = true;
|
||||
latestVersion = grpSyncItem->publishTs > metaIter->second->mPublishTs;
|
||||
}
|
||||
|
||||
if(!grpSyncItem->authorId.isNull() && rsReputations->isIdentityBanned(grpSyncItem->authorId))
|
||||
// FIXTESTS global variable rsReputations not available in unittests!
|
||||
if(rsReputations == 0){ std::cerr << "rsReputations==0, accepting all groups!" << std::endl; }
|
||||
if(!grpSyncItem->authorId.isNull() && rsReputations && rsReputations->isIdentityBanned(grpSyncItem->authorId))
|
||||
{
|
||||
#ifdef NXS_NET_DEBUG_0
|
||||
GXSNETDEBUG_PG(tr->mTransaction->PeerId(),grpId) << " Identity " << grpSyncItem->authorId << " is banned. Not syncing group." << std::endl;
|
||||
|
|
|
@ -70,7 +70,7 @@ void PeerNode::provideFileHash(const RsFileHash& hash)
|
|||
void PeerNode::manageFileHash(const RsFileHash& hash)
|
||||
{
|
||||
_managed_hashes.insert(hash) ;
|
||||
_turtle->monitorTunnels(hash,_turtle_client) ;
|
||||
_turtle->monitorTunnels(hash,_turtle_client, false) ;
|
||||
}
|
||||
void PeerNode::sendToGRKey(const GRouterKeyId& key_id)
|
||||
{
|
||||
|
|
|
@ -65,7 +65,9 @@ public:
|
|||
|
||||
~RsSharedPtr()
|
||||
{
|
||||
lock();
|
||||
DecrementAndDeleteIfLast();
|
||||
unlock();
|
||||
}
|
||||
private:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue