Skip to content

Commit

Permalink
nrf_rpc: Fix command response decoding
Browse files Browse the repository at this point in the history
Fixed an issue where the nrf_rpc_cbor_cmd_rsp
function decodes only the first response element.

NCSDK-22770

Signed-off-by: Kamil Gawor <[email protected]>
  • Loading branch information
KAGA164 committed Aug 17, 2023
1 parent 1f01ace commit 57f2368
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions nrf_rpc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ All the notable changes to this project are documented on this page.
Main branch
***********

Bug fixes
=========

* Fixed an issue where the :c:func:`nrf_rpc_cbor_cmd_rsp` function decodes only the first response element.

Changes
=======

Expand Down
2 changes: 1 addition & 1 deletion nrf_rpc/nrf_rpc_cbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ int nrf_rpc_cbor_cmd_rsp(const struct nrf_rpc_group *group, uint8_t cmd,

if (err >= 0) {
zcbor_new_decode_state(ctx->zs, ARRAY_SIZE(ctx->zs),
ctx->out_packet, rsp_size, 1);
ctx->out_packet, rsp_size, NRF_RPC_MAX_PARAMETERS);
}

return err;
Expand Down

0 comments on commit 57f2368

Please sign in to comment.