libbarrelfish: distops: retry getting monitor RPC client if it is currently NULL
@@ -185,12 +185,16 @@ static errval_t cap_retype_remote(struct capref src_root, struct capref dest_roo
gensize_t objsize, size_t count, capaddr_t to,
capaddr_t slot, int to_level)
{
+ errval_t err, remote_cap_err;
struct monitor_blocking_binding *mrc = get_monitor_blocking_binding();
if (!mrc) {
+ err = monitor_client_blocking_rpc_init();
+ mrc = get_monitor_blocking_binding();
+ if (err_is_fail(err) || !mrc) {
return LIB_ERR_MONITOR_RPC_NULL;
}
+ }
- errval_t err, remote_cap_err;
int send_count = 0;
do {
err = mrc->rpc_tx_vtbl.remote_cap_retype(mrc, src_root, dest_root, src,
@@ -218,12 +222,16 @@ static errval_t cap_retype_remote(struct capref src_root, struct capref dest_roo
*/
static errval_t cap_delete_remote(struct capref root, capaddr_t src, uint8_t level)
{
+ errval_t err, remote_cap_err;
struct monitor_blocking_binding *mrc = get_monitor_blocking_binding();
if (!mrc) {
+ err = monitor_client_blocking_rpc_init();
+ mrc = get_monitor_blocking_binding();
+ if (err_is_fail(err) || !mrc) {
return LIB_ERR_MONITOR_RPC_NULL;
}
+ }
- errval_t err, remote_cap_err;
int count = 0;
do {
err = mrc->rpc_tx_vtbl.remote_cap_delete(mrc, root, src, level,
@@ -249,12 +257,16 @@ static errval_t cap_delete_remote(struct capref root, capaddr_t src, uint8_t lev
*/
static errval_t cap_revoke_remote(struct capref root, capaddr_t src, uint8_t level)
{
+ errval_t err, remote_cap_err;
struct monitor_blocking_binding *mrc = get_monitor_blocking_binding();
if (!mrc) {
+ err = monitor_client_blocking_rpc_init();
+ mrc = get_monitor_blocking_binding();
+ if (err_is_fail(err) || !mrc) {
return LIB_ERR_MONITOR_RPC_NULL;
}
+ }
- errval_t err, remote_cap_err;
int count = 0;
do {
err = mrc->rpc_tx_vtbl.remote_cap_revoke(mrc, root, src, level,
