mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-02 19:26:31 -04:00
Fixed a bunch of warnings in safe ways
This commit is contained in:
parent
3c5e12ae84
commit
633a6cf8c2
13 changed files with 41 additions and 48 deletions
|
@ -206,27 +206,25 @@ 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();)
|
||||
for(std::map<sockaddr_storage,BanListPeer>::iterator it(mBanRanges.begin());
|
||||
it!=mBanRanges.end(); )
|
||||
{
|
||||
if(it->second.reason == RSBANLIST_REASON_AUTO_RANGE)
|
||||
{
|
||||
std::map<sockaddr_storage,BanListPeer>::iterator it2=it ;
|
||||
++it2 ;
|
||||
mBanRanges.erase(it) ;
|
||||
it=it2 ;
|
||||
|
||||
changed = true ;
|
||||
}
|
||||
else
|
||||
++it;
|
||||
else ++it;
|
||||
}
|
||||
|
||||
IndicateConfigChanged();
|
||||
|
||||
if(!mAutoRangeIps)
|
||||
return ;
|
||||
if(!mAutoRangeIps) return;
|
||||
|
||||
#ifdef DEBUG_BANLIST
|
||||
std::cerr << "Automatically figuring out IP ranges from banned IPs." << std::endl;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue