init: apply changes of <provides> nodes

This patch enables init to apply changes of any server's <provides>
declarations in a differential way. Servers can in principle be extended
by new services without re-starting them. Of course, changes of the
<provides> declarations may affect clients or would-be clients as this
information is taken into account for the session routing.
This commit is contained in:
Norman Feske
2017-03-03 12:50:29 +01:00
committed by Christian Helmuth
parent 0202048eb6
commit 9dca1503a8
3 changed files with 213 additions and 21 deletions

View File

@ -178,6 +178,8 @@ struct Test::Main : Log_message_handler
Timer::Connection _timer { _env };
bool _timer_scheduled = false;
Reporter _init_config_reporter { _env, "config", "init.config" };
Attached_rom_dataspace _config { _env, "config" };
@ -269,8 +271,11 @@ struct Test::Main : Log_message_handler
}
if (step.type() == "sleep") {
unsigned long const timeout_ms = step.attribute_value("ms", 250UL);
_timer.trigger_once(timeout_ms*1000);
if (!_timer_scheduled) {
unsigned long const timeout_ms = step.attribute_value("ms", 250UL);
_timer.trigger_once(timeout_ms*1000);
_timer_scheduled = true;
}
return;
}
@ -311,6 +316,8 @@ struct Test::Main : Log_message_handler
throw Exception();
}
_timer_scheduled = false;
_advance_step();
_execute_curr_step();
}