Bugfix urpc should handle a missing cap
This commit is contained in:
parent
2751ed3a15
commit
80313640f4
@ -68,10 +68,14 @@ errval_t do_aos_urpc(
|
||||
if (ret0 != NULL) *ret0 = rpc->meta->a2;
|
||||
if (ret1 != NULL) *ret1 = rpc->meta->a3;
|
||||
|
||||
if(ret_cap != NULL && rpc->meta->cap.type != ObjType_Null) {
|
||||
assert(rpc->meta->cap.type == ObjType_RAM);
|
||||
err = ram_forge(*ret_cap, rpc->meta->cap.u.ram.base, rpc->meta->cap.u.ram.bytes, my_core_id);
|
||||
if (err_is_fail(err)) return err;
|
||||
if(ret_cap != NULL) {
|
||||
if(rpc->meta->cap.type != ObjType_Null) {
|
||||
assert(rpc->meta->cap.type == ObjType_RAM);
|
||||
err = ram_forge(*ret_cap, rpc->meta->cap.u.ram.base, rpc->meta->cap.u.ram.bytes, my_core_id);
|
||||
if (err_is_fail(err)) return err;
|
||||
} else {
|
||||
*ret_cap = NULL_CAP;
|
||||
}
|
||||
}
|
||||
|
||||
return rpc->meta->a0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user