mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-24 19:24:25 +00:00
Fix: reset word counter in case of failed IPC.
If IPC fails for some reasons, reset received counter of items+words. This operation is not performed by the kernel.
This commit is contained in:
parent
12f2572155
commit
c873faa390
@ -138,11 +138,12 @@ void Ipc_client::_call()
|
|||||||
_rcv_msg->rcv_prepare_pt_sel_window(utcb);
|
_rcv_msg->rcv_prepare_pt_sel_window(utcb);
|
||||||
|
|
||||||
/* establish the mapping via a portal traversal */
|
/* establish the mapping via a portal traversal */
|
||||||
if (Ipc_ostream::_dst.dst() == 0)
|
uint8_t res = Nova::call(Ipc_ostream::_dst.dst());
|
||||||
PWRN("destination portal is zero");
|
if (res) {
|
||||||
int res = Nova::call(Ipc_ostream::_dst.dst());
|
/* If an error occurred, reset word&item count (not done by kernel). */
|
||||||
if (res)
|
utcb->set_msg_word(0);
|
||||||
PERR("call returned %d", res);
|
PERR("call returned %u", res);
|
||||||
|
}
|
||||||
|
|
||||||
copy_utcb_to_msgbuf(utcb, _rcv_msg);
|
copy_utcb_to_msgbuf(utcb, _rcv_msg);
|
||||||
_snd_msg->snd_reset();
|
_snd_msg->snd_reset();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user