Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrf_rpc: enable zcbor stop_on_error flag for decoding #17209

Merged
merged 1 commit into from
Sep 11, 2024

Commits on Sep 11, 2024

  1. nrf_rpc: enable zcbor stop_on_error flag for decoding

    1. The zcbor's stop_on_error flag, which defaults to false,
    makes the decoder stop decoding any subsequent items after
    a decoding error occurs, meaning that all subsequent
    decoding attempts fail early until the error is cleared
    with zcbor_pop_error() function.
    
    This flag is already set for the encoder yet it was
    omitted for the decoder although some nRF RPC decoder
    functions seem to rely the flag being set as they only
    check the decoding result after trying to decode all
    the command or response arguments.
    
    2. Fix a function for checking if the next data item is
    null. The function would fail the decoding if the next
    item was another CBOR simple type, such as a bool constant.
    
    Signed-off-by: Damian Krolik <[email protected]>
    Damian-Nordic committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    7314538 View commit details
    Browse the repository at this point in the history