update RouterInfo if congestion cap changed

This commit is contained in:
orignal 2023-03-07 13:09:07 -05:00
parent 6d7f20961f
commit 46e4f4aea5
3 changed files with 6 additions and 3 deletions

View file

@ -1149,14 +1149,16 @@ namespace data
SetProperty ("caps", caps);
}
void LocalRouterInfo::SetHighCongestion (bool highCongestion)
bool LocalRouterInfo::SetHighCongestion (bool highCongestion)
{
Congestion c = highCongestion ? eHighCongestion : eLowCongestion;
if (c != GetCongestion ())
{
SetCongestion (c);
UpdateCapsProperty ();
return true;
}
return false;
}
void LocalRouterInfo::WriteToStream (std::ostream& s) const