-
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
nanocoap: make coap_get_block2() actually fill struct #11802
Conversation
@kb2ma I hope this doesn't collide too much with your stack of CoAP PRs. Could we get this in first? It is a dependency of SUIT updates. |
I'm fine with reverting this PR's commit in #11057 as first step. That should prevent the bitrot? |
Sounds good to me. |
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.
This PR is a straightforward extension of the existing block1 getter (server request handler) to also get block2 (client response handler). Tested block2 by running block client test app. Confirmed no regression with block1 by running nanocoap server for /sha256 resource.
In coap_get_block(), the blknum and szx variables are not necessary. However, this PR is intended to be a minimal impact stopgap until we merge #11057 in 2019.10, which addresses this issue.
Thanks for the quick review! |
Contribution description
Previously, coap_get_block2() did not fill the passed structure, making it unusable.
This refactors coap_get_block1() into a shared coap_get_block() function and implements both coap_get_block1() and coap_get_block2() using that.
Testing procedure
Issues/PRs references