-
Notifications
You must be signed in to change notification settings - Fork 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
sys/net/nanocoap: improve coap_build_reply()
#21155
Open
maribu
wants to merge
2
commits into
RIOT-OS:master
Choose a base branch
from
maribu:sys/net/nanocoap/coap_build_reply
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+67
−23
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maribu
added
Type: enhancement
The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Area: doc
Area: Documentation
Impact: minor
The PR is small in size and might only require a quick look of a knowledgeable reviewer
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
labels
Jan 22, 2025
github-actions
bot
added
Area: network
Area: Networking
Area: sys
Area: System
and removed
Area: doc
Area: Documentation
labels
Jan 22, 2025
mguetschow
reviewed
Jan 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, nice start! Some suggestions below.
maribu
force-pushed
the
sys/net/nanocoap/coap_build_reply
branch
3 times, most recently
from
January 23, 2025 10:45
e2464a0
to
58ca598
Compare
mguetschow
reviewed
Jan 23, 2025
mguetschow
reviewed
Jan 23, 2025
mguetschow
reviewed
Jan 23, 2025
Using a constant is easier than explaining where the magic 1 came from in size estimations.
maribu
force-pushed
the
sys/net/nanocoap/coap_build_reply
branch
2 times, most recently
from
January 23, 2025 17:43
7141f4f
to
38397bc
Compare
mguetschow
reviewed
Jan 24, 2025
maribu
force-pushed
the
sys/net/nanocoap/coap_build_reply
branch
from
January 24, 2025 15:24
38397bc
to
526310d
Compare
github-actions
bot
added
the
Area: CoAP
Area: Constrained Application Protocol implementations
label
Jan 24, 2025
maribu
changed the title
sys/net/nanocoap: improve doc for
sys/net/nanocoap: improve Jan 24, 2025
coap_build_reply()
coap_build_reply()
maribu
added
the
Process: API change
Integration Process: PR contains or issue proposes an API change. Should be handled with care.
label
Jan 24, 2025
- The responsibility for handling matching CoAP No-Response Options has been split: - `coap_build_reply()` only needs to report this and return `-ECANCLED` - `coap_handle_req()` does generate the empty ACK is needed. ==> As a result, writing CoAP request handlers correctly becomes a lost easier. Correct error handling to be present is now sufficient for correct handling of No-Response options. ==> This change is backward compatible with existing code. - The API doc has been cleaned up and straightened Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
maribu
force-pushed
the
sys/net/nanocoap/coap_build_reply
branch
from
January 24, 2025 15:32
526310d
to
d1da109
Compare
I changed the API for handling with the No-Response case, so that less foot-shooting should occur. The API change is not breaking:
|
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
Impact: minor
The PR is small in size and might only require a quick look of a knowledgeable reviewer
Process: API change
Integration Process: PR contains or issue proposes an API change. Should be handled with care.
Type: enhancement
The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
coap_build_reply()
only needs to report this and return-ECANCLED
coap_handle_req()
does generate the empty ACK is needed.==> As a result, writing CoAP request handlers correctly becomes a lost easier. Correct error handling to be present is now sufficient for correct handling of No-Response options.
==> This change is backward compatible with existing code.
Testing procedure
(CoAP reply handlers that did not get error handling correctly will stay broken.)
Issues/PRs references
None