-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 731453886624f5805642965fd13563dee875d672 more detailssdk-nrf:
nrfxlib:
Github labels
List of changed files detected by CI (10)
Outputs:ToolchainVersion: 2aae60c2f9 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
e137997
to
7863e10
Compare
7863e10
to
fceabd8
Compare
d018434
to
3f37a2b
Compare
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]>
3f37a2b
to
7314538
Compare
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.