1.1 --- a/libipc/lib/src/message.c Tue Mar 07 19:10:40 2023 +0100
1.2 +++ b/libipc/lib/src/message.c Thu Mar 09 19:27:22 2023 +0100
1.3 @@ -481,11 +481,15 @@
1.4 long ipc_message_import_capability(ipc_message_t *msg, int item, l4_cap_idx_t *ref)
1.5 {
1.6 long err;
1.7 + int local;
1.8
1.9 - err = _import_capability(msg->tag, &msg->bregs, &msg->mregs, item, ref);
1.10 + err = _import_capability(msg->tag, &msg->bregs, &msg->mregs, item, ref, &local);
1.11 if (err)
1.12 return err;
1.13
1.14 + if (local)
1.15 + return L4_EOK;
1.16 +
1.17 return ipc_message_expect_capability(msg, item);
1.18 }
1.19
1.20 @@ -495,11 +499,15 @@
1.21 long ipc_message_import_dataspace(ipc_message_t *msg, int item, l4re_ds_t *mem, l4_addr_t *addr)
1.22 {
1.23 long err;
1.24 + int local;
1.25
1.26 - err = _import_dataspace(msg->tag, &msg->bregs, &msg->mregs, item, mem, addr);
1.27 + err = _import_dataspace(msg->tag, &msg->bregs, &msg->mregs, item, mem, addr, &local);
1.28 if (err)
1.29 return err;
1.30
1.31 + if (local)
1.32 + return L4_EOK;
1.33 +
1.34 return ipc_message_expect_capability(msg, item);
1.35 }
1.36