Don't loop forever if upgrade of a donation failed.

The code intended to stop after the first failed attempt,
however the bool variable to control this was reseted
inside the loop and so it endless loops.

Fixes #51
This commit is contained in:
Alexander Boettcher 2012-07-05 10:27:18 +02:00 committed by Norman Feske
parent 33a2f54413
commit 9e582c59a9
1 changed files with 2 additions and 4 deletions

View File

@ -49,9 +49,8 @@ namespace Genode {
Local_addr local_addr = (addr_t)0,
bool executable = false) {
bool try_again;
bool try_again = false;
do {
try_again = false;
try {
return Rm_session_client::attach(ds, size, offset,
use_local_addr,
@ -84,9 +83,8 @@ namespace Genode {
: Ram_session_client(cap), _cap(cap) { }
Ram_dataspace_capability alloc(size_t size, bool cached) {
bool try_again;
bool try_again = false;
do {
try_again = false;
try {
return Ram_session_client::alloc(size, cached);