From e9f310110567e91bce1faa86ea458884ebc19fc4 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Wed, 15 Nov 2023 15:13:29 +0100 Subject: [PATCH] base: restore the session phase in `Parent_service' Issue #5055 --- repos/base/include/base/service.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repos/base/include/base/service.h b/repos/base/include/base/service.h index 2eaf528c25..2e3312f7c6 100644 --- a/repos/base/include/base/service.h +++ b/repos/base/include/base/service.h @@ -357,6 +357,8 @@ class Genode::Parent_service : public Try_parent_service void initiate_request(Session_state &session) override { + Session_state::Phase original_phase = session.phase; + for (unsigned i = 0; i < 10; i++) { try { @@ -367,11 +369,13 @@ class Genode::Parent_service : public Try_parent_service Ram_quota ram_quota { ram_quota_from_args(session.args().string()) }; Parent::Resource_args args(String<64>("ram_quota=", ram_quota)); _env.parent().resource_request(args); + session.phase = original_phase; } catch (Out_of_caps) { Cap_quota cap_quota { cap_quota_from_args(session.args().string()) }; Parent::Resource_args args(String<64>("cap_quota=", cap_quota)); _env.parent().resource_request(args); + session.phase = original_phase; } }