File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
subsys/net/openthread/rpc/client Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -27,20 +27,20 @@ static otMeshLocalPrefix mesh_prefix;
2727
2828static void get_uint_t (int id , void * result , size_t result_size )
2929{
30+ const size_t cbor_buffer_size = 0 ;
3031 struct nrf_rpc_cbor_ctx ctx ;
31- uint32_t value ;
3232
33- NRF_RPC_CBOR_ALLOC (& ot_group , ctx , 0 );
33+ NRF_RPC_CBOR_ALLOC (& ot_group , ctx , cbor_buffer_size );
3434
3535 nrf_rpc_cbor_cmd_rsp_no_err (& ot_group , id , & ctx );
3636
37- value = nrf_rpc_decode_uint ( & ctx );
38- if (! nrf_rpc_decoding_done_and_check ( & ot_group , & ctx )) {
37+ if (! zcbor_uint_decode ( ctx . zs , result , result_size )) {
38+ nrf_rpc_cbor_decoding_done ( & ot_group , & ctx );
3939 ot_rpc_report_rsp_decoding_error (id );
4040 return ;
4141 }
4242
43- memcpy ( result , & value , result_size );
43+ nrf_rpc_cbor_decoding_done ( & ot_group , & ctx );
4444}
4545
4646static int get_string (int id , char * buffer , size_t buffer_size )
You can’t perform that action at this time.
0 commit comments