golioth / golioth-zephyr-sdk

Golioth SDK For Zephyr
https://www.golioth.io
Apache License 2.0
67 stars 19 forks source link

coap_req: ignore already received blocks #410

Closed mniestroj closed 1 year ago

mniestroj commented 1 year ago

coap_update_from_block() does not check previous value of block offset. Do this in golioth_coap_req_reply_handler(), by comparing what was set previously with the value updated from coap_update_from_block() (which is set based on BLOCK2 option of received CoAP packet).

This prevents processing same blocks multiple times.

Fixes: #408

github-actions[bot] commented 1 year ago

Visit the preview URL for this PR (updated for commit 82ea123):

https://golioth-zephyr-sdk-doxygen-dev--pr410-coap-ignore-alre-4z27qm2f.web.app

(expires Tue, 25 Jul 2023 06:15:30 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a389eefadf4b4b68a539327b3459dd66c142cf49