mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-23 04:25:21 +00:00
base: gracefully handle invalid env session routes
This patch addresses the corner cases where an environment session could not be routed, i.e., if an environment LOG log session is routed to a non-existing child.
This commit is contained in:
parent
8d4fb288d9
commit
0202048eb6
@ -516,22 +516,28 @@ class Genode::Child : protected Rpc_object<Parent>,
|
||||
if (_connection.constructed())
|
||||
return;
|
||||
|
||||
Child_policy::Route const route =
|
||||
_child._resolve_session_request(_child._policy,
|
||||
_service_name(),
|
||||
_args.string());
|
||||
|
||||
_env_service.construct(_child, route.service);
|
||||
_connection.construct(*_env_service, _child._id_space, _client_id,
|
||||
_args, _child._policy.filter_session_affinity(Affinity()),
|
||||
route.label);
|
||||
try {
|
||||
Child_policy::Route const route =
|
||||
_child._resolve_session_request(_child._policy,
|
||||
_service_name(),
|
||||
_args.string());
|
||||
_env_service.construct(_child, route.service);
|
||||
_connection.construct(*_env_service, _child._id_space, _client_id,
|
||||
_args, _child._policy.filter_session_affinity(Affinity()),
|
||||
route.label);
|
||||
}
|
||||
catch (Parent::Service_denied) {
|
||||
error(_child._policy.name(), ": ", _service_name(), " "
|
||||
"environment session denied"); }
|
||||
}
|
||||
|
||||
typedef typename CONNECTION::Session_type SESSION;
|
||||
|
||||
SESSION &session() { return _connection->session(); }
|
||||
|
||||
Capability<SESSION> cap() const { return _connection->cap(); }
|
||||
Capability<SESSION> cap() const {
|
||||
return _connection.constructed() ? _connection->cap()
|
||||
: Capability<SESSION>(); }
|
||||
};
|
||||
|
||||
Env_connection<Ram_connection> _ram { *this, Env::ram(), _policy.name() };
|
||||
|
Loading…
x
Reference in New Issue
Block a user