mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
init: trigger report update on version change
If the version attribute of init's <config> is changes, trigger the generation of a new state report that includes the information of the new version.
This commit is contained in:
parent
a5c70244bf
commit
892043ed76
@ -116,17 +116,24 @@ class Init::State_reporter : public Report_update_trigger
|
||||
_reporter->enabled(false);
|
||||
}
|
||||
|
||||
_version = config.attribute_value("version", Version());
|
||||
bool trigger_update = false;
|
||||
|
||||
Version const version = config.attribute_value("version", Version());
|
||||
if (version != _version) {
|
||||
_version = version;
|
||||
trigger_update = true;
|
||||
}
|
||||
|
||||
if (_report_delay_ms) {
|
||||
|
||||
if (!_timer.constructed()) {
|
||||
_timer.construct(_env);
|
||||
_timer->sigh(_timer_handler);
|
||||
}
|
||||
|
||||
trigger_report_update();
|
||||
trigger_update = true;
|
||||
}
|
||||
|
||||
if (trigger_update)
|
||||
trigger_report_update();
|
||||
}
|
||||
|
||||
void trigger_report_update() override
|
||||
|
Loading…
Reference in New Issue
Block a user