Prevent recursion of &on_change handlers.

This change prevents &on_change handlers for a table from running if an
&on_change handler for the same table is already running.
This commit is contained in:
Johanna Amann 2020-02-03 12:33:13 -08:00
parent 7166cb7373
commit 7f9f66fce9
5 changed files with 46 additions and 3 deletions

View file

@ -865,6 +865,8 @@ protected:
PrefixTable* subnets;
Val* def_val;
Expr* change_func = nullptr;
// prevent recursion of change functions
bool in_change_func = false;
};
class RecordVal : public Val, public notifier::Modifiable {