Skip to content

Commit

Permalink
resource; ubridge: remove leading KV_PREFIX_OP_SYNC_C from key only i…
Browse files Browse the repository at this point in the history
…f present while building cmd KV buffers
  • Loading branch information
prajnoha committed Jul 15, 2022
1 parent 1fb6509 commit f737419
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/resource/ubridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,9 +1005,14 @@ static int _build_cmd_kv_buffers(sid_resource_t *cmd_res, const struct cmd_reg *
}
}

key += 1; /* remove leading KV_PREFIX_OP_SYNC_C */
key_size = strlen(key) + 1;

/* remove leading KV_PREFIX_OP_SYNC_C if present */
if (*key == KV_PREFIX_OP_SYNC_C[0]) {
key += 1;
key_size -= 1;
}

// TODO: Also deal with situation if the udev namespace values are defined as vectors by chance.
if (_get_ns_from_key(key) == KV_NS_UDEV) {
if (!(cmd_reg->flags & (CMD_KV_EXPORT_UDEV_TO_RESBUF | CMD_KV_EXPORT_UDEV_TO_EXPBUF))) {
Expand Down

0 comments on commit f737419

Please sign in to comment.