diff --git a/libretroshare/src/grouter/groutertypes.h b/libretroshare/src/grouter/groutertypes.h index 2bb34e635..91eb1608b 100644 --- a/libretroshare/src/grouter/groutertypes.h +++ b/libretroshare/src/grouter/groutertypes.h @@ -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 diff --git a/libretroshare/src/services/p3banlist.cc b/libretroshare/src/services/p3banlist.cc index 2de7b5cbc..9595510bd 100644 --- a/libretroshare/src/services/p3banlist.cc +++ b/libretroshare/src/services/p3banlist.cc @@ -206,6 +206,8 @@ void p3BanList::autoFigureOutBanRanges() { RS_STACK_MUTEX(mBanMtx) ; + bool changed = false ; + // clear automatic ban ranges for(std::map::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,7 +972,9 @@ bool p3BanList::addBanEntry(const RsPeerId &peerId, const struct sockaddr_storag updated = true; } } - IndicateConfigChanged(); + + if(updated) + IndicateConfigChanged(); return updated; }