Skip to content

Commit

Permalink
res: ubr: fix failure to remove a group using sid_ucmd_grp_destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
prajnoha committed Jul 1, 2024
1 parent 2126616 commit ffe9609
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/resource/ubridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2238,8 +2238,8 @@ static int _delta_update(kv_vector_t *vheader, kv_op_t op, struct kv_update_arg
rel_spec->cur_key_spec->id = key_part;
} else {
sid_res_log_error(update_arg->res,
SID_INTERNAL_ERROR "%s: unsupported namespace '%s' found in rel spec",
__func__);
SID_INTERNAL_ERROR "%s: unsupported namespace with internal number %d found in rel spec",
__func__, rel_spec->cur_key_spec->ns);
goto out;
}

Expand Down Expand Up @@ -3443,7 +3443,7 @@ static int _do_sid_ucmd_group_destroy(sid_res_t *res,
.rel_key_spec = &((struct kv_key_spec) {.extra_op = NULL,
.op = KV_OP_SET,
.dom = ID_NULL,
.ns = 0,
.ns = SID_KV_NS_DEVICE,
.ns_part = ID_NULL,
.id_cat = ID_NULL,
.id = ID_NULL,
Expand All @@ -3457,7 +3457,7 @@ static int _do_sid_ucmd_group_destroy(sid_res_t *res,
// TODO: do not call kv_store_get_value, only kv_store_set_value and provide _kv_cb_delta wrapper
// to do the "is empty?" check before the actual _kv_cb_delta operation

if (!(key = _compose_key(ucmd_ctx->common->gen_buf, rel_spec.cur_key_spec)))
if (!(key = _compose_key(NULL, rel_spec.cur_key_spec)))
goto out;

if (!sid_kvs_get(ucmd_ctx->common->kvs_res, key, &size, NULL))
Expand All @@ -3480,7 +3480,7 @@ static int _do_sid_ucmd_group_destroy(sid_res_t *res,

r = 0;
out:
_destroy_key(ucmd_ctx->common->gen_buf, key);
_destroy_key(NULL, key);
return r;
}

Expand Down

0 comments on commit ffe9609

Please sign in to comment.