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

nanocoap/sock: fix state handling for mismatching message ID in nanocoap_sock_request_cb() #20725

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

fabian18
Copy link
Contributor

@fabian18 fabian18 commented Jun 4, 2024

Contribution description

I encountered a situation in nanocoap_sock_request_cb() where the message ID did not match and an
assert(ctx == NULL) fired.
This introduces the state STATE_WAIT_RESPONSE after every (re)transmission.
The function is still hard to read. I added a label at the end to make sure the context is deleted in all cases.

Testing procedure

Issues/PRs references

I must have introduced this with #20697

@github-actions github-actions bot added Area: network Area: Networking Area: CoAP Area: Constrained Application Protocol implementations Area: sys Area: System labels Jun 4, 2024
@fabian18 fabian18 added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Jun 4, 2024
@fabian18 fabian18 force-pushed the pr/nanocoap_sock_fix_ctx_release branch from 710de1c to 5145b29 Compare June 6, 2024 09:27
@fabian18 fabian18 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 6, 2024
@riot-ci
Copy link

riot-ci commented Jun 6, 2024

Murdock results

✔️ PASSED

5145b29 nanocoap/sock: fix context release

Success Failures Total Runtime
10161 0 10161 16m:18s

Artifacts

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/net/gcoap_fileserver is now working again

@benpicco benpicco added this pull request to the merge queue Jun 7, 2024
Merged via the queue into RIOT-OS:master with commit 78da4bc Jun 7, 2024
27 checks passed
@mguetschow mguetschow added this to the Release 2024.07 milestone Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CoAP Area: Constrained Application Protocol implementations Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants