nanocoap: make coap_get_block2() actually fill struct#11802
nanocoap: make coap_get_block2() actually fill struct#11802kb2ma merged 1 commit intoRIOT-OS:masterfrom
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. |
kb2ma
left a comment
There was a problem hiding this comment.
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