-
Notifications
You must be signed in to change notification settings - Fork 107
Closed
Milestone
Description
Although issue #698 was fixed, fix in patch set #707 seems to be workaround not the solution. It introduces a couple of restrictions developers have to keep in mind while writing new configuration specifications. Patch should be reworked in future cfg
updates.
Solution should be have done in the next way (fix from #707 must be rolled back):
Before processing nested entries of TfwCfgSpec
, theirs .call_counter
s must be reset, but for a proper handling .cleanup()
functions .call_counter
s must contain values, generated by CfgParser
.
Let's introduce new member in TfwCfgSpecChild
called TfwCfgSpec *childs_copy;
.
tfw_cfg_handle_children()
should be reworked:
- copy nested entries to
((TfwCfgSpecChild *)parent_entry->spec_ext)->childs_copy
, if copy does not exist; - reset
call_counter
for every spec in copy; - parse nested configuration using copy, not the original specs;
- add
call_counter
s from copied to original specs.
Copied entries must be freed in tfw_cfg_cleanup_children()
.