mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
reduced period for slow saving of GRouter config data, and removed useless saving of BanList config when received data fro friends does not modify the existing data
This commit is contained in:
parent
a6acff491f
commit
5d69ae886a
@ -39,7 +39,7 @@ static const uint16_t GROUTER_CLIENT_ID_MESSAGES = 0x1001 ;
|
||||
|
||||
static const uint32_t RS_GROUTER_MATRIX_MAX_HIT_ENTRIES = 10 ; // max number of clues to store
|
||||
static const uint32_t RS_GROUTER_MATRIX_MIN_TIME_BETWEEN_HITS = 60 ; // can be set to up to half the publish time interval. Prevents flooding routes.
|
||||
static const uint32_t RS_GROUTER_MIN_CONFIG_SAVE_PERIOD = 10 ; // at most save config every 10 seconds
|
||||
static const uint32_t RS_GROUTER_MIN_CONFIG_SAVE_PERIOD = 61 ; // at most save config every 10 seconds
|
||||
static const uint32_t RS_GROUTER_MAX_KEEP_TRACKING_CLUES = 86400*10 ; // max time for which we keep record of tracking info: 10 days.
|
||||
|
||||
static const float RS_GROUTER_BASE_WEIGHT_ROUTED_MSG = 1.0f ; // base contribution of routed message clue to routing matrix
|
||||
|
@ -206,6 +206,8 @@ void p3BanList::autoFigureOutBanRanges()
|
||||
{
|
||||
RS_STACK_MUTEX(mBanMtx) ;
|
||||
|
||||
bool changed = false ;
|
||||
|
||||
// clear automatic ban ranges
|
||||
|
||||
for(std::map<sockaddr_storage,BanListPeer>::iterator it(mBanRanges.begin());it!=mBanRanges.end();)
|
||||
@ -215,6 +217,8 @@ void p3BanList::autoFigureOutBanRanges()
|
||||
++it2 ;
|
||||
mBanRanges.erase(it) ;
|
||||
it=it2 ;
|
||||
|
||||
changed = true ;
|
||||
}
|
||||
else
|
||||
++it;
|
||||
@ -968,6 +972,8 @@ bool p3BanList::addBanEntry(const RsPeerId &peerId, const struct sockaddr_storag
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(updated)
|
||||
IndicateConfigChanged();
|
||||
|
||||
return updated;
|
||||
|
Loading…
Reference in New Issue
Block a user