-
Notifications
You must be signed in to change notification settings - Fork 2.1k
nanocoap: clean up coap_iterate_option(), make it public #19713
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
Conversation
fc460e8
to
0c0ce81
Compare
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.
Looks good to me. One suggestion for wording in the doc.
I think _parse_option()
is unable to parse zero-length CoAP options at the end of the CoAP message (e.g. CoAP number delta < 13, CoAP option length is zero, no payload and no payload marker) :/ But that is completely unrelated to this PR.
db1bee2
to
923c9a3
Compare
No, its fine. I didn't look closely enough. |
bors merge |
bors cancel |
Canceled. |
19705: boards/z1: fix broken clock configuration r=maribu a=maribu ### Contribution description The MSP430F2xx family has on RSEL bit more than the MSP430x1xxx family. The first commit updates the clock calibration accordingly. df5c319 from #19558 broke the clock configuration of the Z1 by relying on the incorrect documentation of what clock is actually used. Closely reading the convoluted clock initialization code revealed that no XT2 crystal is present (as also indicated by some comments in `board.c`), contradicting the `#define MSP430_HAS_EXTERNAL_CRYSTAL 1` in the `board.h`. The second commit should restore behavior (but with calibrated DCO than hard coded magic numbers). 19713: nanocoap: clean up coap_iterate_option(), make it public r=maribu a=benpicco Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net> Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Build failed (retrying...): |
bors cancel Some Makefile.ci bumps are required :-/ |
Canceled. |
Which is odd since I don't see any size increase locally |
bors merge |
Canceled. |
bors merge |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Contribution description
Currently we don't have a public way to iterate all options of the same type -
coap_iterate_option()
was intended to be public (it's notstatic
) but was never declared in any header file.This allows for the opportunity to clean up the API to make it more palatable for public consumption.
Testing procedure
The function is only used by
coap_opt_get_string()
for which we have unit tests that are still passing.Issues/PRs references