Gui::Connection::buffer: fix upgrade loop

Once set to true, the 'retry' flag would never be reset to false.

Issue #5242
This commit is contained in:
Norman Feske 2024-10-01 15:03:01 +02:00 committed by Christian Helmuth
parent bfce470690
commit d29cb0a15d

View File

@ -164,13 +164,12 @@ class Gui::Connection : private Genode::Connection<Session>
_ram_quota.value += upgrade; _ram_quota.value += upgrade;
} }
for (bool retry = false; ; ) { for (;;) {
using Result = Session_client::Buffer_result; using Result = Session_client::Buffer_result;
auto const result = _client.buffer(mode); auto const result = _client.buffer(mode);
if (result == Result::OUT_OF_RAM) { upgrade_ram(8*1024); retry = true; } if (result == Result::OUT_OF_RAM) { upgrade_ram(8*1024); continue; }
if (result == Result::OUT_OF_CAPS) { upgrade_caps(2); retry = true; } if (result == Result::OUT_OF_CAPS) { upgrade_caps(2); continue; }
if (!retry) break;
break;
} }
} }